jquery链式操作的正确使用方法
更新时间:2014年01月06日 10:11:47 作者:
jQuery实现方法的链式操作是非常容易的。这里给出正确的使用方法
糟糕的使用方法
复制代码 代码如下:
$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);
相关文章
jquery获取ASP.NET服务器端控件dropdownlist和radiobuttonlist生成客户端HTML标签
jquery获取ASP.NET服务器端控件dropdownlist和radiobuttonlist生成客户端HTML标签后的value和text值2010-06-06


最新评论