jQuery增加自定义函数的方法

时间:2015-07-18    点击:73   

本文实例讲述了jQuery增加自定义函数的方法。分享给大家供大家参考。具体如下:

$.fn.myFunction = function() { 
  return $(this).addClass('changed'); 
}
//用法:
$('.changePlease').myFunction();

希望本文所述对大家的jquery程序设计有所帮助。

javascript中mouseover、mouseout使用详解
javascript实现的简单计时器
javascript中setInterval的用法
javascript获取网页宽高方法汇总
jQuery获取URL请求参数的方法
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved