I need to find all elements that has a special attribute value.
Here is the div I need to find (I have many of them..)
$('div[imageId="imageN"]').each(function() { // `this` is the div });
To check for the sole existence of the attribute, no matter which value, you could use ths selector instead: $('div[imageId]')
$('div[imageId]')