onclick enabled a class jquesry show code example Example: jquery toggle class $( "#foo" ).toggleClass( 'className', addOrRemoveOptional );