jquery.extend()与jquery.fn.extend()
$.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类上
切忌浮躁
浙公网安备 33010602011771号