网络编程 
首页 > 网络编程 > 浏览文章

jquery链式操作的正确使用方法

(编辑:jimmy 日期: 2025/12/26 浏览:3 次 )

糟糕的使用方法
复制代码 代码如下:
$second.html(value);
$second.on('click',function(){
alert('hello everybody');
});
$second.fadeIn('slow');
$second.animate({height:'120px'},500);

建议使用方法
复制代码 代码如下:
$second.html(value);
$second.on('click',function(){
alert('hello everybody');
}).fadeIn('slow').animate({height:'120px'},500);

上一篇:Javascript 遍历页面text控件详解
下一篇:jquery设置text的值示例(设置文本框 DIV 表单值)
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 网站地图 SiteMap