What am I missing here?
<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
<script>
$("a").click(function() {
alert("Handler for .click() called.");
window.location.reload();
});
</script>
<li><a id='fu' href="change_password" target="content">Change Password</a>
<li><a id='fu' href="delete_user" target="content">Delete User</a></li>
I click and I get no alert……
document.ready(function() – if the element doesn’t exist in the dom at the time of binding then no event handlers will be attached to the element. Use document ready function to wait for dom to be ready before trying to bind event handlers to elements