how to change class name of an element by jquery

前端 未结 3 579
野的像风
野的像风 2021-01-31 07:19
<
3条回答
  •  -上瘾入骨i
    2021-01-31 07:58

    $('.IsBestAnswer').addClass('bestanswer').removeClass('IsBestAnswer');
    

    Case in method names is important, so no addclass.

    jQuery addClass()
    jQuery removeClass()

提交回复
热议问题