保捱科技网
您的当前位置:首页jquery链式操作的正确使用方法_jquery

jquery链式操作的正确使用方法_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);

显示全文