So I wish to check a variable called SRC against the source of images in a list from my HTML and if it returns true then run a certain function.
It seems that it is not currently running properly, please see the link for a live example.
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.
You should check the length property whenever you check for any element which is missing in your code.
Also you had few other issues in the code like using src as attribute selector which will not work because it cantains
/and it is not escaped.I have fixed those issues and also improvised the code. Take a look
Working demo