title: jQuery toggle clicks
body: <p>I am trying to make an app in which when you click some text it shows content and when you click again it hides it.
  my current jquery is this: </p>
  
  <pre><code>$(document).ready(function(e) {
  
  $("h2").toggle( 
      function(){ $(this).next().show(); },
      function(){ $(this).next().hide(); }
      ); //end of toggle
  
  }); // end of ready
  </code></pre>
  
  <p>but when I run it on browser everything hides immediately </p>