问题
I found this post about setting up a query to show/hide elements on a page: Show / Hide elements based on query string value
How do I extend it to show/hide multiple elements?
For instance... Let's say I have six elements on a page with the following classes: .a, .b, .c, .d, .e, .f
With one query I hide: .b,.d,.f and another hide: .a, .c, .e
Two different queries that can handle hiding multiple elements.
Can anyone help out?
回答1:
$('.b,.d,.f').hide();
$('.a, .c, .e').hide();
来源:https://stackoverflow.com/questions/15072532/show-hide-multiple-elements-based-on-query-string-value