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:
$(document).ready(function(e) {
$("h2").toggle(
function(){ $(this).next().show(); },
function(){ $(this).next().hide(); }
); //end of toggle
}); // end of ready
but when I run it on browser everything hides immediately