try... $(function() { $("a").click(function () { $("#box").fadeOut(); }); });
also, you're not linking the jquery lib sucessfully. replace ... <script type="text/javascript" src="jquery-1.3.2.min.js"></script> ... with ... <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.1/jquery.min.js"></script> On May 20, 11:23 am, Kerry <vkerrysi...@gmail.com> wrote: > Hi I'm new to Jquery and trying a simple example before I start > working with it. Can someone please help me understand why the > following is not working. Firebug repport '$ is not defined'. > jquery-1.3.2.min.js is in the same directory as the web page as well. > > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=ISO-8859-1"> > <script type="text/javascript" src="jquery-1.3.2.min.js"></script> > <style type="text/css"> > #box > { > background:red; > width:80px; > height:80px; > } > </style> > > <script type="text/javascript"> > $(document).ready(function(){ > $('a.box').click(function() { > $('#box').fadeOut(); > }); > }); > > </script> > > <title>Test</title> > </head> > <body> > <div id="box"></div> > <a href="#" >Link</a> > > </body> > </html>