jquery1.11.x integrates with AMD
AMD joins jquery, where jquery divides the source into individual logic modules.
- Ready is integrated into a Deferred-dependent module.
- Some modules are cut into some more maintainable fragments.
- The module specified by the Var folder contains only shared variable declarations.
(function(Global,Factory) { if( typeofModule=== "Object" && typeofModule.Exports=== "Object" ) { //For COMMONJS and Commonjs similar environments, if there is an appropriate window, //Execute the Global factory method to obtain jquery objects; //In environments where window,document are not inherently owned, such as node. JS, //Get a jquery-made factory to serve Module.exports; //This highlights the need to build a real window //e.g var jQuery = require ("jquery") (window);Module.Exports=Global.Document? Factory( Global, true) : function(W) { if( !W.Document){ Throw New Error("jQuery requires a window with a document" ); } return Factory( W); }; } Else { Factory( Global); } }(typeofWindow!== "undefined" ?Window: This, function(Window,Noglobal){ varJquery= {}; returnJquery; }));//The meaning is that jquery now supports node, and it takes global as a window in node.