Dear all,
I am just about learning jquery and following the tutorials on the site. Heres the html. As per the instructions and my understanding, as soon as I click on the link, I should be receiving a pop up. However nothing comes and the link takes me to <a href="http://jquery.com">jquery.com</a>
<html>
<head>
<script type="text/javascript" src="jquery-1[1].2.6.js"></script>
<script type="text/javascript">
// Your code goes here
$(document).ready(function(){
// Your code here
});
$("a").click(function(){
alert("Thanks for visiting!");
});
$("a").click(function(event){
event.preventDefault();
alert("As you can see, the link no longer took you to <a href="http://jquery.com">jquery.com</a>");
});
</script>
</head>
<body>
<a href="<a href="http://jquery.com/">jQuery</a">http://jquery.com/">jQuery</a</a>>
</body>
</html>
I would be grateful if someone can please point me to what is wrong in the code.
thanks