jQuery: Selecting by class and input type

前端 未结 6 1207
忘了有多久
忘了有多久 2021-01-30 05:51

I would like to select a set of elements that are both of a certain input type (say, a checkbox) and have a certain class using jQuery. However, when I try the following:

6条回答
  •  死守一世寂寞
    2021-01-30 06:24

    Just in case any dummies like me tried the suggestions here with a button and found nothing worked, you probably want this:

    $(':button.myclass')
    

提交回复
热议问题