No...(those two lines are the same, aren't they?)... Using jQuery typically involves 3 parts of code:
- the script reference, which is what you have below <script scr...> - the jQuery script that you write in the head portion of your document - the HTML that the jQuery script acts upons We're wanting to take a look at all three parts...anything wrong with any part can cause your jQuery not to function. This is the kind of thing we're looking for: Your script reference, such as: <script src="jquery-1.3.2.js" type="text/javascript"></script> Your jQuery in the head part of your document, such as: <script> $(document).ready(function() { $('#myDiv').fadeIn(1000); )}; </script> And your HTML, which the script your reference and the script your write above will act upon, such as: <div id="myDiv" style="background-color:red; height:200px; width:200px; border:1px solid black;"></div> (The div above would be in your between the opening and closing of your body tag in your document.) When you run your page with the code I've written, you should see a red square 200px x 200px fade in over 1 second. So a basic document named, jquery_test.html, might look like this: <html> <head> <script src="jquery-1.2.3.js" type="text/javascript"></script> <script> $(document).ready(function() { $('#myDiv').fadeIn(1000); )}; </script> </head> <body> <div id="myDiv" style="background-color:red; height:200px; width:200px; border:1px solid black;"></div> </body> </html> Now the script reference to jquery-1.2.3.js in my example above is assuming that you have placed the "core" jquery file (jquery-1.2.3.js) in the same folder as the document I just wrote. So, on your hard drive, you would have this directory structure or whatever your drive is: e:\jquery\div\jquery-1.2.3.js (for the core file) In the same folder, you would have: e:\jquery\div\jquery_test.html (it doesn't matter where the files are, as long as they are in the same folder.) Does that make sense? hth, Rick -----Original Message----- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Josh Powell Sent: Thursday, March 05, 2009 9:40 PM To: jQuery (English) Subject: [jQuery] Re: can't get started Did you mean to: <script src="jquery-1.3.2.js" type="text/javascript"></script> instead of <script src="jquery-1.2.3.js" type="text/javascript"></script> On Mar 5, 3:37 pm, dawnerd <dawn...@gmail.com> wrote: > Can you please post the html you were using? > > On Mar 5, 2:32 pm, Dr G <michaelg...@gmail.com> wrote: > > > Hello, > > > I've downloaded both the compressed & uncompressed versions and > > tried both the initial example from the jquery site > > (http://docs.jquery.com/ > > Tutorials:How_jQuery_Works) and the step-by-step intro from the > > tutorial videos (http://blog.themeforest.net/tutorials/jquery-for- > > absolute-beginners-video-series/). I have tried putting the jquery > > download in the same directory as my html (e.g. <script > > src="jquery-1.2.3.js" type="text/javascript"></script>... and I've > > tried putting it in a separate directory and put the path to it in > > the src parameter field. > > > In all cases I get the same result; nothing. If I put other > > JavaScript in my html file I can get it to do stuff (e.g. put up an > > alert box) but nothing I've done has resulted in a detectable > > invocation of jQuery functions. I'm doing this all under OS X, and > > I've also opened a terminal window and chmod'd the jquery-1.3.2.js > > file to 777, but that had no apparent effect either. > > > Would anyone be willing to let me know where I've gone wrong? It is > > frustrating not to be able to do the most basic step. > > > Thanks, > > > Michael