[jQuery] Re: jQuery works in one place but not another

2008-07-11 Thread Richard D. Worth
When you call $(document).ready, the $ is equal to jQuery, so it works. You're passing it a callback function to be executed when the DOM is ready. By that time another library has loaded and overwritten the $. For possible work-arounds see http://docs.jquery.com/Using_jQuery_with_Other_Libraries

[jQuery] Re: jQuery works in one place but not another

2008-07-11 Thread Josh
Ok, I think I found a way around the problem. Apparently one of the other scripts my institution uses was overwriting $ or something... Including the jQuery library at the end of the HTML file (while not proper) seems to get around it. On Jul 11, 11:38 am, Josh <[EMAIL PROTECTED]> wrote: > I'm o

[jQuery] Re: jQuery works in one place but not another

2008-07-11 Thread Josh
I just tried this change: $(document).ready(function () { alert('this works'); $('h2').fadeOut('slow'); }); Same problem: "$ is not a function." The alert works, but the fadeOut() doesn't. Why would it work for $(document) but not the other? On Jul 11, 11:38 am, Josh <[EMAIL PROTEC