I found the problem in my coding. I forgot to put the first line of the following.
$(document).ready(function() { $("a").click(function() { alert("Hello world!"); }); }); On Oct 4, 11:36 am, elvisparsley <[EMAIL PROTECTED]> wrote: > I just started learning jQuery. Could any one help me? > > I was following the jQuery tutorial, and the first one does not work. > It is supposed to come up alert with Thanks fo visiting!. But it just > go to a website without alert. > > <html> > <head> > <script type="text/javascript" src="jquery-1.2.1.js"></script> > <script type="text/javascript"> > // Your code goes here > $("a").click(function(){ > alert("Thanks for visiting!"); > }); > </script> > </head> > <body> > <a href="http://jquery.com/">jQuery</a> > </body> > </html>