toggle class html code example
Example 1: jquery toggle class
$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
Example 2: toggle class
<div class="tumble">Some text.</div>
$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
<div class="tumble">Some text.</div>