I'm trying to use some jquery within my template, but somehow I can't get it work.
what I put in the page.tpl.php is the following:

$(document).ready(function)(){ $("p").mouseover(function () { $(this).css("background-color","red"); }) });

These is loaded after the jquery.js but it does nothing. On a plain html it is working... I also tried to put the javascript in a seperat file but this wasn't working either. Am I missing something?
Thx

Comments

hollybeary’s picture

you have the script inside of script tags in the head right?

rkarajgi’s picture

If you enable the jstools module then jquery gets loaded on the pages where you use jstools features such as ActiveMenu. You can check that using Firebug for Firefox as well. You do not need to add include in your theme.

I hope this helps.

- Rajeev Karajgikar, Drupaler in South Bay Area

----------------------------------------------------------
- R Karajgikar