For some reason, when I click on the image with this jquery code, the warning screen does not appear.
I use the jquery plugin to get Twitter images from people who used #Image, this works great and exposes html that looks like this.
If I try the selector with the body instead of the image, a warning will appear, but I can not get it to work with the image selector, why doesn’t it respond?
i included jquery as follows:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
im 100% sure html is checked correctly at least 10 times.
the only error the console gives is: "Attr.nodeValue" is deprecated. Use "value" instead. but I don’t think this should stop the jquery above working on the body when I tried the script below the div, it didn’t work either.
HTML:
<div id="example1"> <div> <div> <div class="user"> <img class="Image" src="images/image.jpg"> </div> </div> </div> </div>
JavaScript:
$(document).ready(function(){ $("img").click(function(){ alert("it works!"); }); });
source share