jquery noConflict
1. code:
(function($){
$.hello = function(str){alert("hello "+str);}
})(jQuery);
2: note:
如果页面作者使用了Prototype,且已调用了$.noConflict(),则$被占用,
通过将jQuery传递给$形参,来解决问题。
1. code:
(function($){
$.hello = function(str){alert("hello "+str);}
})(jQuery);
2: note:
如果页面作者使用了Prototype,且已调用了$.noConflict(),则$被占用,
通过将jQuery传递给$形参,来解决问题。