jQuery context attribute

Example

Detect Context:

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

Try It Yourself

Definition and Usage

The context attribute is deprecated in jQuery version 1.10.

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

Syntax

context