Do we need to change anything in main jquery library ever to use jquery noconflict?
Do we nee开发者_StackOverflow社区d to change anything in main jquery library ever to use jquery noconflict?
You don't have to change the jquery lib itself but you have to change your code using jquery. Instead of $('#myid') you have to use jQuery('#myid') then.
For more information on the noconflict mode visit http://docs.jquery.com/Using_jQuery_with_Other_Libraries
Not in the jquery library itself, but some plugins rely on the $ variable.
Your question is not very clear, is this what you mean?
jQuery.noConflict();
jQuery('#id'); //instead of $('#id');
Because then you should change all your code to use jQuery instead of $. If you mean your won extensions, you should set them up as follow:
(function($){
$.myPlugin = function() { ]
})(jQuery);
Then you are safe for people who use jQuery.noConflict
I'm sure it's a big NO. You don't really have to.
精彩评论