[jQuery] Re: How to check if jquery is working?

2009-05-21 Thread heldtogether

Ok, thanks for the help people. I had to move the jquery.js into a
subdirectory and link from there, and it now seems to be working.

On May 16, 2:43 pm, Jim D nofxbassist1...@gmail.com wrote:
 You can also check to see if $ is a function.  If the jQuery script
 loaded properly, that should return true

 On May 15, 2:16 pm, James james.gp@gmail.com wrote:

  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(){ $(pHello 
   world!/p).appendTo(body); $(#onlineresources).hide(); 
   $(#onlineresourcesbutton).click(function(){ 
   $(#onlineresources).slideDown(slow); return false; }); }); /script 
   Thanks, Josh


[jQuery] Re: How to check if jquery is working?

2009-05-16 Thread Jim D

You can also check to see if $ is a function.  If the jQuery script
loaded properly, that should return true

On May 15, 2:16 pm, James james.gp@gmail.com wrote:
 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(){ $(pHello 
  world!/p).appendTo(body); $(#onlineresources).hide(); 
  $(#onlineresourcesbutton).click(function(){ 
  $(#onlineresources).slideDown(slow); return false; }); }); /script 
  Thanks, Josh


[jQuery] Re: How to check if jquery is working?

2009-05-15 Thread James

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(){ $(pHello 
 world!/p).appendTo(body); $(#onlineresources).hide(); 
 $(#onlineresourcesbutton).click(function(){ 
 $(#onlineresources).slideDown(slow); return false; }); }); /script 
 Thanks, Josh