Get first and last class with jQuery

后端 未结 7 1307
一整个雨季
一整个雨季 2021-02-09 02:58

Might be a newbie question. I have a code line like this:

I need to get each class for itself.

相关标签:
7条回答
  • 2021-02-09 03:53

    You can use the Javascript split() method:

    var classes = $(this).attr("class").split(" ");
    
    0 讨论(0)
提交回复
热议问题