jQuery show/hide 1 at a time
<p>I have created something where upon clicking a div/button, it opens a separate div and its contents. I am looking to have all of the non-targeted items close or slide up upon clicking one of the button divs. </p>

<p>Long story short, I want only 1 'target-div' open at a time. How do I accomplish this? (link to fiddle below code)</p>

<pre><code>$('.target-div').hide();
$('.button').click(function () {
  var $target = $('#div' + $(this).data('target'));

  $(this).addClass('selected').siblings().removeClass('selected');
  $target.delay(300).slideDown();    

 if($target.is(':visible')){
  $(this).removeClass('selected');
  $target.slideUp('normal').removeClass('open');
  return false;
 }  
});
</code></pre>

<p><a href="http://jsfiddle.net/dNU92/8/" rel="nofollow">http://jsfiddle.net/dNU92/8/</a></p>
