zl程序教程

您现在的位置是:首页 >  前端

当前栏目

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

jQuery方法 使用 操作 正确 链式
2023-06-13 09:15:15 时间

糟糕的使用方法

复制代码代码如下:

$second.html(value);
$second.on("click",function(){
alert("helloeverybody");
});
$second.fadeIn("slow");
$second.animate({height:"120px"},500);

建议使用方法

复制代码代码如下:

$second.html(value);
$second.on("click",function(){
alert("helloeverybody");
}).fadeIn("slow").animate({height:"120px"},500);