jQuery toggle class

后端 未结 2 1337
猫巷女王i
猫巷女王i 2020-12-03 19:02

I\'m having trouble adding in jQuery\'s toggleClass function into the rest of my code. The page has several HTML5 audio tags on it which are controlled via jQuery. I attempt

2条回答
  •  猫巷女王i
    2020-12-03 19:48

    $('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.

提交回复
热议问题