「jQuery」$.extend() メソッドの使い方まとめ

方法1
$.extend(src)
$.extend({
hello:function(){alert('hello’);}
});

方法2
$.fn.extend(src)
$.fn.extend({
hello:function(){alert('hello’);}
});

方法3
$.extend({net:{}});
$.extend($.net,{
hello:function(){alert('welcome’);}
})

方法4
extend(boolean,dest,src1,src2,src3…)
var result=$.extend( true, {},
{ name: “Lucy", location: {city: “new york",county:"xxx"} },
{ last: “taro", location: {state: “tokyo",county:"○○○"} } );

JavaScript

Posted by arkgame