javascript - What is x.fn.x.init[] value shown for $() and $(this) in chrome dev tools -
i have habbit of debugging js , jquery script in developer tool. realized chrome dev tools showing x.fn.x.init value $() , $(this). dont realize these value:
code
<!doctype html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <script src="jquery-2.0.2.min.js" ></script> <script src="jquery.ui.widget.js" ></script> <title></title> <script type="text/javascript"> $(document).ready(function () { var outstring = ""; outstring = "" + $() + $(this); }); </script> </head> <body> </body> </html>
this real code behind instantiating $
take @ github source
jquery.fn = jquery.prototype = { // current version of jquery being used jquery: core_version, constructor: jquery, init: function( selector, context, rootjquery ) { var match, elem; .....
and @ line 263
// give init function jquery prototype later instantiation jquery.fn.init.prototype = jquery.fn;
since using minified version, gets turned see.
Comments
Post a Comment