SlideToggle

Simple click and slide toggle options (text version)

HTML

<a class="ahref" data-div=".box1">LOL</a>
<a class="ahref" data-div=".box2">Hide</a>
<a class="ahref" data-div=".box3">Hide</a>

<div class="box1">1</div> 
<div class="box2">2</div> 
<div class="box3">3</div>

CSS

.ahref {  display:inline-block; cursor:pointer; }

JavaScript

$('.ahref').click(function() {
    myLink = $(this);
 	myLink.toggleClass('hidden'); //change the status of the link
    var txt = myLink.hasClass('hidden') ? 'LOL' : 'Retour aux images'; //what text should we show
    myLink.text(txt); //update the text
    $(myLink.data('div')).slideToggle(500); //slide the DIV
});