Code is not running on .click of hyperlink

Posted by coffeeaddict on Stack Overflow See other posts from Stack Overflow or by coffeeaddict
Published on 2010-04-15T14:14:01Z Indexed on 2010/04/15 14:23 UTC
Read the original article Hit count: 156

Filed under:

Code is not running on .click when I have this:

$(".cancel").click(function() {
                       alert("got here");
                       $(this).closest(":dialog").dialog("close");                            
                   });

<a class="cancel" href=""><img src="images/cancelButton.gif" border="0" /></a>

It's got to be something stupid, but I cannot see it.

© Stack Overflow or respective owner

Related posts about jQuery