jquery starterkit tutorial doesn't work, syntax error in click function
Sorry but I can't get the very first tutorial to work. I put the custom.js in a test_jr directory in htdocs.
I also put the starterkit.html file in the same directory. I copied the contents of jquery-1.4.4.min.js into a jquery.js file also in the same directory. Then I did the custom.js page shown here:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a").click(function() {
alert("Hello world!");
}); ******
});
</script>
</head>
<body>
<a href="">Link</a>
</body>
</html>
I tried clicking on the http://myServer/test_jr/starterkit.html and I get the starterkit.html page. If I click on the "some link" it doesn't do anything. What am I missing? There are syntax errors in my editor starting on the
line with the asterisks ***** Why is there an error there? It looks like it closes the click function?
thanks,
jr