title: Slide down and slide up div on click
body: <p>I am using the following code to open and close a div ( slide up/down ) using js</p>
  
  <p>I have the slide down event attached to a button and the slide up event sttached to close text.</p>
  
  <p>What I want is the button onclick to open and onclick again close the slide element.</p>
  
  <p>Here is the JS</p>
  
  <pre><code>// slide down effect
  
  $(function(){
  $('.grabPromo').click(function(){
  var parent = $(this).parents('.promo');
  $(parent).find('.slideDown').slideDown();
  });
  $('.closeSlide').click(function(){
  var parent = $(this).parents('.promo');
  $(parent).find('.slideDown').slideUp();
  });
  });
  </code></pre>
  
  <p>The HTML:</p>
  
  <pre><code>&lt;span class="grabPromo"&gt;Open&lt;/span&gt;
  </code></pre>
  
  <p>and in the slide down area i have</p>
  
  <pre><code>&lt;a class="closeSlide"&gt;Close&lt;/a&gt;
  </code></pre>
  
  <p>Any help appreciated.</p>
  
  <p>Ideally I want a down pointing arrow on the slide down button and a up pointing arrow to replace it to slide up on same button. And do away with the close link altogether.</p>
  
  <p>Any help appreciated. Cheers</p>