toggle div jquery code example
Example 1: toggle text jquery
$("button").click(function(){
$(this).text($(this).text() == 'Show' ? 'Close' : 'Show');
});
Example 2: jquery toggle show hide
$( "#clickme" ).click(function() {
$( "#book" ).toggle( "slow", function() {
// Animation complete.
});
});