I have this really simple issue: I can’t call an image with jquery. With the id of an a tag it was working. What should I change?
js:
$("#for_close").click(function(){
disablePopup();
});
html:
<img src="images/close-x.png" id="for_close" />
Is it different with images?
Thanks!
Is not working with document ready:
$(document).ready(function() {
$("#pentru_close").click(function(){
disablePopup();
});
});
I don’t understand why this with a text works:
<a id="pentru_close">x</a>
and this not:
<img src="images/close-x.png" id="pentru_close" />
jQuery – make sure you have added the link to your jQuery file
HTML –