"Oh?! You mean I have to include jQuery before the examples will work?"
 
:)
 
I've done that before without realizing it.

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Swedberg
Sent: Tuesday, August 26, 2008 8:20 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Problem with Tutorials:How jQuery Works


Hi there, 

First thing to do is make sure the reference to the jquery.js file is
correct. That sort of error usually occurs when it can't find the jquery.js
file. In Firefox, open the script tab in Firebug (If you don't have this
extension, get it here: http://www.getfirebug.com/ ) and click on the file
name heading. you should see two file names, one for jquery.js and one for
the current html page. Select the jquery.js file and look in the Script
inspector to see if it's giving you a 404.

You'll probably want to add a return false; after the alert line, too.

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 26, 2008, at 8:41 AM, Caveman wrote:



I'm having a problem running the first simple example in this
tutorial. here is my code:

<html>
 <head>
   <script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript">

$(document).ready(function(){
  $("a").click(function(){
  alert("Thanks for visiting!");
});

});
   </script>
 </head>
 <body>
   <a href="http://jquery.com/";>jQuery</a>
 </body>
 </html>

Seems pretty simple but does not work for me in IE 7, firefox, or
Opera.  I am running this in IIS on my XP Pro box.  IE just gives me
the error Object Expected.



Reply via email to