Show/Hide Multiple elements based on query string value

断了今生、忘了曾经 提交于 2019-12-25 17:13:31

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!