I have an attribute being applied to my dynamically created divs called data-product. Is there a selector I can use to select all divs without a specific data-product value? For instance, if one of the data-product values is "radio," is there a way I can select every div with a data-product value that does not equal radio?
<div data-product="radio" class="product"></div>
<div data-product="television" class="product"></div>
<div data-product="speakers" class="product"></div>
Thanks in advance!
Here is what you want
$(".product[data-product!='radio']")
or
$(".product:not([data-product='radio'])")
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With