;function($){
$.fn.extend({ //$.fn是jqury的原型对象, extend是jquery用来扩展属性和方法
"color":function(value){
return this.css("color",value);
}
})
}
$("div").color("red"); //这样就简单的编写了一个专门写字体颜色的插件了
;function($){
$.fn.extend({ //$.fn是jqury的原型对象, extend是jquery用来扩展属性和方法
"color":function(value){
return this.css("color",value);
}
})
}
$("div").color("red"); //这样就简单的编写了一个专门写字体颜色的插件了