background image
HomeRecent PostsDrupalSearchTagsRSSContactAboutAccount

$ is not defined

Eric.London's picture

I just created a new Drupal site and tried adding some jQuery to the theme. Unfortunately, it seems jQuery is not always included. I added a javascript include call in my template.php file to get it working...

<?php
drupal_add_js
('misc/jquery.js', 'core', 'header');
?>

I'll include more information when I figure out what was causing this issue.

Me too...

I bumped into this issue today on a new D6 site as well. I have the Zen subtheme in development which seems to fail to load the jQuery files. Interesting, I have the rootcandy theme running in the admin area that does include the jQuery files without any tinkering.

Thoughts?

This is HUGE

Hi Eric. This issue solves a LOT of problems, namely those that appear for developers who don't check their error console to see when jQuery isn't defined.

Thank you very much for providing the directions -I- needed once I understood the issue I was having. You are a treasure. My girlfriend and I adore the presentation of your site and I wish you all the very best with it in future.

-Rory