Response title
This is preview!
What was the intention of introducing .noConflict(true) if not to support multiple versions of jQuery running simultaneously?
Many JavaScript libraries use$
as a function or variable name, just as jQuery does. In jQuery's case,$
is just an alias forjQuery
, so all functionality is available without using$
. If you need to use another JavaScript library alongside jQuery, return control of$
back to the other library with a call to$.noConflict()
. Old references of$
are saved during jQuery initialization;noConflict()
simply restores them.
Why are AMD support being added to jQuery and plugins if not to support multiple versions of jQuery running simultaneously?
Off the top of my head, this will 1) hurt performance by requiring additional DOM manipulation on every single widget instantiation 2) break CSS based on position (direct child, nth-of, etc) 3) Not work because of nesting.My suggestion seems fairly simple to implement. Future versions of UI should have the version number as part of all CSS selectors (replace "version" with actual UI version number):
Also, developers (most likely less experienced once) often tend to just switch the jQuery version to one that suit their needs, causing all other extensions to break. That's terrible.
Loading multiple versions of any library is never good.
© 2013 jQuery Foundation
Sponsored by and others.