首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

Fn.extend增多Jquery自身方法

2012-09-10 
Fn.extend增加Jquery自身方法例子:$.fn.extend({customInputCheck: function(o) {$(this).get(0).checked

Fn.extend增加Jquery自身方法
例子:

$.fn.extend({customInputCheck: function(o) {        $(this).get(0).checked = o;        if (o) {            $(this).next().addClass("checked");        } else {            $(this).next().removeClass("checked");        }    }});


PS:这样可以使用$("#aaa").customInputCheck()调用

热点排行