jQuery “Does not have attribute” selector?

前端 未结 3 1403
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 08:09

I can find a div that has an attribute like so:

$(\'.funding-plan-container[data-timestamp]\')

But if I try to find a div that does not hav

3条回答
  •  感情败类
    2020-12-13 08:38

    Try it with the :not() pseudo-class selector: http://api.jquery.com/not-selector/

    $('.funding-plan-container:not([data-timestamp])')
    

提交回复
热议问题