jQuery:一次显示几个元素

时间:2013-10-22 07:48:06

标签: jquery show-hide

是否有这样的功能:

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

我不想每次都写

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

1 个答案:

答案 0 :(得分:1)

你把选择器和功能搞混了:

$('#anID, .aClass, .anotherClass, #anotherID').show();
相关问题