Keep button in active state until clicked upon again

前端 未结 3 1728
太阳男子
太阳男子 2021-01-20 03:02

I feel like I have a relatively simple question that I\'m just not sure how to go about doing. I have an html input tag of button type which calls a javascript onclick funct

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-20 03:46

    You have to use toggleclass feature of jQuery

    
    

    Check working code on jsfiddle

提交回复
热议问题