jQuery 1.7+, AMD (RequireJS), and Global Scope
I'm trying to get more in line w/ AMD, and I've come across something in jQuery source that I just can't quite undertand. Here is section (found just before the end of the file): if ( typeof define === "function" && define.amd && define.amd.jQuery ) { define( "jquery", [], function () { return jQuery; } ); } From what I can see, one of the major points of AMD is to keep the global scope clean. Yet jQuery chooses to return a reference to itself as a module, but still infects the global space. It seems to me, that adding "jQuery.noConflict();" just before the return would resolve this and still