jQuery slideToggle()

Supporting example to help BruceGust on Experts-Exchange (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28605701.html)

HTML

<div class="show_hide"><img  src="http://lorempixel.com/400/200/cats" alt="bcca-series-main" /></div>
<div class="slidingDiv">
<img src="http://lorempixel.com/400/200/food" alt="bcca-series-detail"/></div>


<div class="show_hide"><img  src="http://lorempixel.com/400/200/nature" alt="bcca-series-main" /></div>
<div class="slidingDiv">
<img src="http://lorempixel.com/400/200/sports" alt="bcca-series-detail" /></div>

JavaScript

$(".slidingDiv").hide();
$(".show_hide").show();

$('.show_hide').click(function(){
    $(this).next().slideToggle();
});


$('.slidingDiv').click(function(){
    $('.slidingDiv').slideUp();
});