How can I select an element with multiple classes in jQuery?

前端 未结 13 2676
一向
一向 2020-11-22 00:51

I want to select all the elements that have the two classes a and b.


So, only the e

13条回答
  •  日久生厌
    2020-11-22 01:07

    your code $(".a, .b") will work for below multiple elements (at a same time)

    
    
    

    if you want to select element having a and b both class like than use js without coma

    $('.a.b')
    

提交回复
热议问题