Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.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
jQuery:一次显示多个元素_Jquery_Show Hide - Fatal编程技术网

jQuery:一次显示多个元素

jQuery:一次显示多个元素,jquery,show-hide,Jquery,Show Hide,有没有这样的功能: $.show('#anID, .aClass, .anotherClass, #anotherID'); 我不想每次都写 $('#anID').show(); $('.aClass').show(); // etc... 您将选择器和函数混淆: $('#anID, .aClass, .anotherClass, #anotherID').show(); $('#anID、.aClass、.anotherClass、#anotherID')。show()而是添加一个公共类

有没有这样的功能:

$.show('#anID, .aClass, .anotherClass, #anotherID');
我不想每次都写

$('#anID').show();
$('.aClass').show();
// etc...

您将选择器和函数混淆:

$('#anID, .aClass, .anotherClass, #anotherID').show();

$('#anID、.aClass、.anotherClass、#anotherID')。show()
而是添加一个公共类并调用它。谢谢,我停电了。。