Tutorials References Exercises Videos NEW Menu
Paid Courses Website NEW

jQuery context Property

❮ jQuery Properties

Example

Determine the context:

$("div").append("<p>" + $("div").context + "</p>")
.append("<p>" + $("div",document.body).context.nodeName + "</p>");

Definition and Usage

The context property was deprecated in version 1.8 and removed in jQuery version 3.0.

The context property contains the original context passed to jQuery, which could be a DOM node context, or, if no node is passed, the document context.


Syntax

context

❮ jQuery Properties