context
UK [?k?ntekst] US [?kɑ:ntekst]
n.Context; context; background; environment
jquery context attribute syntax
Function: The context attribute was deprecated in jQuery version 1.10. The context property contains the original context passed to jQuery, which may be the DOM node context, or the document context if no node is passed.
Grammar: context
jquery context attribute example
<!DOCTYPE html> <html> <head> <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("div").append("<p>" + $("div").context + "</p>").append("<p>" + $("div",document.body).context.nodeName + "</p>"); }); </script> </head> <body> <span>Context: <div></div></span> <span><b>注釋:</b>context 屬性在 jQuery 版本 1.10 中被棄用。</span> </body> </html>
Click the "Run instance" button to view the online instance