jQuery Properties

Beginner
5 min read
Updated: Nov 2026
4 method guides
Method index

About This Index

This page is the jQuery Properties index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.

Learn the jQuery overview on /jquery. Use this page when you need a collection property such as .length, .jquery, or .context.

Beginner path.

Start with .length, then .jquery—read .context and .selector only when maintaining pre–jQuery 3 code.

How to Read a Property

Access properties without parentheses — they are fields, not methods:

jQuery
var $items = $("li");

$items.length;                // how many matched
$items.jquery;                // e.g. "3.7.1"
$.fn.jquery;                  // same version via the prototype

if ($items.length) {
  $items.first().addClass("ok");
}

// Removed in jQuery 3.0 — do not rely on these in new code:
// $items.context
// $items.selector

jQuery Properties Table

All Properties guides in this jQuery tutorial series (4 tutorials).

Current Properties

2 methods

Read-only fields still available on modern jQuery collections.

MethodDescriptionTutorial
.lengthNumber of DOM elements in the collection — 0 when nothing matched; prefer over removed .size().Try it
.jqueryjQuery version string on every collection — also readable as $.fn.jquery.Try it

Legacy Properties

2 methods

Removed in jQuery 3.0 — keep for migration notes and older codebases.

MethodDescriptionTutorial
.contextDOM node originally passed to jQuery() — removed in jQuery 3.0; used by legacy .live().Try it
.selectorOriginal CSS selector string at creation — deprecated 1.7, removed 3.0; unreliable after traversal.Try it

Frequently Asked Questions

They are read-only fields on jQuery collections (or the jQuery namespace)—you access them without parentheses. Examples: .length for match count and .jquery for the version string.
Methods are functions you call: $('p').hide(). Properties are values you read: $('p').length returns a number. Do not write .length().
.context and .selector were removed. The second argument to jQuery(selector, context) still scopes a search; you just cannot read .context back from the collection.
Use .length. .size() was a method alias and was removed—length is the supported match count on every collection.
Start with .length, then .jquery. Read .context and .selector only when maintaining pre–jQuery 3 code.

Start with .length

Open the length guide—syntax, examples, and FAQs.

.length tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

16 people found this page helpful