jQuery toggle class

$('thumbnail').toggleClass('pausing playing');

ToggleClass: Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument.

Leave a Comment