Try using tools like the Web Development toolbar add-on for Firefox to
debug. Under "Information > View Javascript", you can view all of the
Javascript that is loaded on the page, such as maybe other Javascript
libraries that are overriding the $ variable.
This will help you see what Javascript is on your page, and whether
they are linked correctly or not.

Additionally, also use the Firebug add-on to check whether your
Javascript is spitting out any errors.

Try also simplifying your code to something like:

jQuery(document).ready(function(){
     alert('test');
});


On May 15, 6:00 am, Charlie <charlie...@gmail.com> wrote:
> is jquery.js included on page and is it loading (ie is path valid to 
> jquery.js)?
> heldtogether wrote:Hi, I want to try incorporate jquery in my site, but I'm 
> having some problems. The site is drawn together from various files in PHP. I 
> have added the jquery script which I would expect to work fine regardless of 
> the PHPness earlier because it is a client side script. Unfortunately nothing 
> happens. If I save the page directly to my desktop then the script works 
> fine, so I think there must be some problems with the dynamic pages. Does 
> anyone have any idea why this might be occuring? The following is what gets 
> put onto the page in the header if I view source. <script 
> type="text/javascript" src="jquery.js"></script> <script 
> type="text/javascript"> $(document).ready(function(){ $("<p>Hello 
> world!</p>").appendTo("body"); $("#onlineresources").hide(); 
> $("#onlineresourcesbutton").click(function(){ 
> $("#onlineresources").slideDown("slow"); return false; }); }); </script> 
> Thanks, Josh

Reply via email to