How do I change an elements class in jquery?

前端 未结 4 1270
情话喂你
情话喂你 2021-01-15 05:36

Assuming I have

    how can I change the value of verticalList using jquery?

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-15 06:22

    Try a combination of addClass and removeClass

    $(selector).removeClass('verticleList').addClass('newClass');
    

    Also, did you mean: vertical

提交回复
热议问题