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

时间:2014-01-06    点击:118   

糟糕的使用方法

复制代码 代码如下:

$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);

js解决弹窗问题实现班级跳转DIV示例
instanceof和typeof运算符的区别详解
jquery使用append(content)方法注意事项分享
javascript客户端遍历控件与获取父容器对象示例代码
Javascript 遍历页面text控件详解
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved