For example
I have a page where there are 4 images
<img src="1" />
<img src="2" />
<img src="3" />
<img src="4" />
Filter:
<form>
<input type="checkbox" name="gallery" value="abstract" /> Abstract<br />
<input type="checkbox" name="gallery" value="landscape" /> Landscape
</form>
How can I add some markup each image to be part of a certain category, then using a checkbox to filter them with jquery .hide()
? I'd prefer not using the class attribute.
Thanks a lot for the huge help!
For type add a certain class (even if you do not want to...)
Fiddle: http://jsfiddle.net/maniator/3bk22/
You may use the attribute alt of img
and jquery:
Try this: http://jsfiddle.net/shaneburgess/wTkR5/6/
HTML:
Try this