removeClass() if it exists

后端 未结 6 955
时光说笑
时光说笑 2020-12-29 20:01

This function adds a rotated class to my button when I click it. The button has an arrow on it which points in the direction the panel has slid.

How co

6条回答
  •  隐瞒了意图╮
    2020-12-29 20:44

    you can you simple swith the class on click

    
    $('.myclassname').on('click', function(){
        $('.myclass h2').toggleClass( 'first_class', 'second_class');
    }); 
    

提交回复
热议问题