I’m trying to implement a few sections on my personal site to show/hide certain images. Ex: Print / Web / UI / ALL. Once one if these are clicked, it will hide everything BUT that link. Does anyone know of a somewhat simple way to do this using jQuery? Here is my code is set up now:
<div class="boxgrid slideright">
<img class="cover" src="images/xxx.jpg"/>
<h3>Some title</h3>
<p>some text<br/><a href="images/xxx.jpg" rel="group"
class="fancybox">View »</a> </p>
</div>
I’ve looked online and SO and have had no luck. Sorry if I missed something somewhere and thanks in advance!
Here’s a simple implementation that works well enough to give you an idea for development:
This is based on the following HTML structure:
JS Fiddle demo.
References:
click().event.preventDefault().fadeIn().fadeOut().find().not().