jQuery: Temporarily change a style then reset to original class

后端 未结 4 1366
一向
一向 2020-12-13 05:33

Say I have a class named testThing:

.testThing
{
   background-color:#000000;
   float:left;
   height:50px;
   width:50px;
}

And I want to

4条回答
  •  借酒劲吻你
    2020-12-13 06:19

    What about toggleClass("testThing")? I use it when there's more than one property to change.

    http://api.jquery.com/toggleClass/

提交回复
热议问题