I have - what I think - should be a very simple jquery script. When the register_hyperlink anchor is clicked, I am presented with the alert box, as expected; but after I click the OK, I am getting an error:
Uncaught SyntaxError: Unexpected token )
The code block is below. I can't see anywhere that there are unbalanced parenthesis as the error states. The code below is inside the element of my html page.
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#register_hyperlink").click(function() {
alert('Hello');
});
});
</script>
Does anyone have any idea how to go about debugging this? I've been at it for a while now, but am having zero luck.
Thanks!
onclickattribute in theaelement.click()isn't deprecated...a simple check in the jQuery docs would confirm that. It's just a shortcut for.on("click". And being deprecated doesn't mean it's not available, it means it will be removed in a future build.