I’m trying to get a jQuery selector to return all the images that don’t have a certain src.
$('img[src!="/img/none.png"]')
These images are already transparent so, for performance sake I’m trying to exclude them from the ones that I fade in/out. But the query still returns the images with src = /img/none.png
If however I do
$('img[src="/img/none.png"]')
It will return only the images with src = /img/none.png. So it seems like the attribute not equal selector is broken?
Relevant documentation
http://api.jquery.com/attribute-not-equal-selector/
try
If that doesn’t work, try
depending on what browser you’re in, the src isn’t interpreted as what you set, it’s interpreted as the absolute URI, so your browser thinks it’s
http://www.yoursite.com/img/none.png. I’m not sure how jQuery is reading the src so it may be picking up the absolute URI.