toggle class of children on a button click jquery code example Example: jquery toggle class $( "#foo" ).toggleClass( 'className', addOrRemoveOptional );