jquery toggle class show hide code example
Example 1: jquery toggle class
$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
Example 2: jquery toggle show hide
$( "#clickme" ).click(function() {
$( "#book" ).toggle( "slow", function() {
// Animation complete.
});
});