views:

139

answers:

2

I've looked high and low through the docs and internet, and damn if I can't figure this out.

I would like to use jquery to select all images with a specific source and apply a tool tip to them. I have the tooltip working fine when I'm finding the target with classes, but I figured it would be a bit more efficient and avoid adding unneeded classes when I should be able to select all the images with a known img source. The code that I think should work is:

$("img[src*='phone']")

The image tag in the source is:

<img src='images/icons/Phone-32x32.png'>

Using Firebug's Dom inspector, the img element has the following source:

"http://www.deleted.com/v2/images/icons/Phone-32x32.png"

I've dicked around with various waves of selecting it, and it's beyound me. Any help would be greatly appreciated.

+1  A: 

Ugh... CAPs bite me in the ass again! Changed it to:

$("img[src*='Phone']")

works fine. Please ignore my stupidity.

Ryan
A: 

If you'd like a case-insensitive selector this question might be helpful:

http://stackoverflow.com/questions/187537/is-there-a-case-insensitive-jquery-contains-selector

MDCore