[jQuery] Trouble getting .click() Tutorial code to work in FF3
This tutorial code works fine in Safari 3.1.1 and Opera 9.5.0 but is
failing in FireFox 3.0. These are all Mac OS X versions. In the case
of FF3 when you click the link jquery.com is loaded. The code which
adds the test class to the a element does work in FF3.
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function(){
$("a").click(function(){
event.preventDefault();
$(this).hide("slow");
});
$("a").addClass("test");
});
</script>
<style type="text/css">a.test { font-weight: bold; }></style>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
</body>
</html>