JQuery: choosing images with a specific source?

I looked high and low through documents and the Internet, and hell if I can't figure it out.

I would like to use jquery to select all images with a specific source and apply a hint to them. I have a tooltip that works great when I find a target with classes, but I decided that it would be a little more efficient and would not add unnecessary classes when I can select all the images with the famous img source. Code that I think should work:

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

Image tag in source:

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

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

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

I trudged along with various waves of choice, and it swept me. Any help would be greatly appreciated.

+3
2

... CAP ! :

$( "IMG [src= '']" )

. , .

+5
0

Source: https://habr.com/ru/post/1708567/


All Articles