Reputation: 11845
It is possible join this code, in something less redundant?
$('#x').hide();
$('#y').hide();
$('#z').hide();
i already tried $('#x', '#y', '#z').hide();
but didn't work.
thanks
Upvotes: 0
Views: 78
Reputation: 5165
This should work:
$('#x, #y, #z').hide();
http://api.jquery.com/multiple-selector/
Upvotes: 7