I just tried this change: <script type="text/javascript" src="/scripts/jquery.js"></script> <script type="text/javascript"> $(document).ready(function () { alert('this works'); $('h2').fadeOut('slow'); }); </script>
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 PROTECTED]> wrote: > I'm observing some strange behavior with jQuery 1.2.6 today. I've got > this in my <head> > > <script type="text/javascript" src="/scripts/jquery.js"></script> > <script type="text/javascript"> > $(document).ready(function () { > alert('this works'); > }); > > function showFilterCalendar() { > $('h2').fadeOut('slow'); > > // don't follow the link > return false; > } > </script> > > When the page loads, I get the alert box saying "this works." > However, when I click a link like <a href="#" > onclick="javascript:return showFilterCalendar()">test</a>, I get the > infamous "$ is not a function" error. > > Ideas?