<a myattr="something">anchor</a>
<a>anchor</a>
$(a[myattr]) does not work
$(a[myattr!="") does not work
$(a[myattr!==undefined) does not work
What works for getting those anchors whose "myattr" are defined and equal to something?
If you put the selector between quotes, your first one should work.
$('a[myattr]')
Fiddle
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