JQuery, use selector to get images by their border attribute (not the css border styling)

Posted by adbox on Stack Overflow See other posts from Stack Overflow or by adbox
Published on 2010-03-13T22:47:48Z Indexed on 2010/03/13 22:55 UTC
Read the original article Hit count: 202

Filed under:

Hey Guys,

I want to round up all images that have a specific attribute and place. My images look like this:

<img src='http...' border=3 class=grid_pic>

And here is my attempt:

$('.grid_pic:has(border=3)').each(function(){alert(1);}); 

But the alert doesn't shout. If I remove the has:border/has:border=3, it shouts.

Any ideas?

© Stack Overflow or respective owner

Related posts about jquery-selectors