More

jQuery: How To Target Image By src

In most cases, you'll have various options available to you for targeting an image, but if for some reason you have no other way of getting to an image, and you have access to the header data information then you can use some jQuery magic.

Below is the one line of code you need to get it done.

Done and done…Boom!

$("img[src='image-urk.jpg']").hide();

Glenton
I design and develop experiences that make people's lives simple.

Leave a Reply

Your email address will not be published. Required fields are marked *

Post a Review

Leave a Reply

Your email address will not be published. Required fields are marked *