摘要:
$.extend({ hello : function(){ alert(1); } }); $.fn.extend({ hello : function(){ alert(2); } }) $.hello(); $('#div').hello(); $.extend({net:{}}); console.log($.net); $.extend($.net,{hello : function(){alert(3)}}); $.net.hello(); 有第一个参数 合并到第一个参数,没有第一个参数合并到jquery类上 阅读全文