I currently have an image gallery with a filtering capability (Jquery Quicksand) which is in Wordpress. Each image in the gallery possesses a data-id
(eg data-id="id-148"
).
I'd like to ask help on how to code on jQuery
. I hope to have a multiple set of data-ids
initially removed (or hidden) when the website loads then when I click on certain buttons (a href
) with specific Class, these data-ids
will then be showed.
Let's say onLoad
of the website, the images with data ids: 148, 149, 150
will be hidden then onClick
of a button with a particular class class="show"
then data-ids 148, 149, 150
will show. When I click class="All"
the data-ids
mentioned above will be hidden again.
The image is located in a list-item as such:
<li class="one-third column" data-id="id-148" data-type="Apples">
Hope to have some help. Thank you so much.