jquery find element by specific class when element has multiple classes

后端 未结 5 1175
Happy的楠姐
Happy的楠姐 2021-01-30 22:15

So I am working on something that wasn\'t well thought out in the build from the backend team. That leaves me with a document full of divs.

What I am doing is rolling b

5条回答
  •  不知归路
    2021-01-30 22:43

    you are looking for http://api.jquery.com/hasClass/

    $('#mydiv').hasClass('foo') //returns ture

提交回复
热议问题