Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquery在与';这';_Javascript_Jquery_Jquery Selectors - Fatal编程技术网

Javascript jquery在与';这';

Javascript jquery在与';这';,javascript,jquery,jquery-selectors,Javascript,Jquery,Jquery Selectors,有没有办法把两个动画功能组合成一个,因为它们是相同的 谢谢 卢卡当然,只要使用: 当然,只要使用: 而不是: $(this).siblings('p').add(this).animate({color:color_column},2000); 你可以做: $(this).siblings('p').animate({color:color_column},2000); $(this).animate({color:color_column},2000); .而不是: $(this).sib

有没有办法把两个动画功能组合成一个,因为它们是相同的

谢谢 卢卡

当然,只要使用:

当然,只要使用:

而不是:

$(this).siblings('p').add(this).animate({color:color_column},2000);
你可以做:

$(this).siblings('p').animate({color:color_column},2000);
$(this).animate({color:color_column},2000);
.

而不是:

$(this).siblings('p').add(this).animate({color:color_column},2000);
你可以做:

$(this).siblings('p').animate({color:color_column},2000);
$(this).animate({color:color_column},2000);
.

您可以使用以下方法:

您可以使用以下方法:

$(this).siblings('p').andSelf().animate({color:color_column},2000);