TeNDoLLA Posted October 21, 2008 Share Posted October 21, 2008 So this is my html straight from the first tutorial on jQuerys site. I have the .js file in same directory with the html file but nothing happens. What possible I could be doing wrong in such a simple script? <html> <head> <title>Jquery test</title> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript"> $(document).ready(function(){ // Your code goes here $("a").click(function(event){ alert("Thanks for visiting!"); }); } </script> </head> <body> <a href="http://jquery.com/">jQuery</a> </body> </html> Quote Link to comment Share on other sites More sharing options...
TeNDoLLA Posted October 21, 2008 Author Share Posted October 21, 2008 Okey solved. Was missing the last parenthesis and its shame that javascript does not throw any erros from situations like this. <script type="text/javascript"> $(document).ready(function(){ // Your code goes here $("a").click(function(event){ alert("Thanks for visiting!"); }); }[b])[/b] </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.