I tried:
$("img[src='"+imgSrc+"']")
but it did not work. imgSrc is an absolute path, but the path in the HTML file is relative. Knowing that I can’t modify imgSrc, how can I find images by their absolute path?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only thing I can think of is finding the
imgelements and looking at theirsrcproperty (rather than attribute; they’re different for images with relative paths) to pick out the one(s) you want, e.g.:Live example