Feb
28
2011
8

JQuery Not Working in Drupal 7

If when converting a theme to Drupal 7 you get the following Javascript errror in your JQuery:

$ is not a function

This is because Drupal 7 improves compatability with other Javascript libraries so you need to put the following wrapper around your code:


(function ($) {

//your existing code

})(jQuery);

Written by Pete in: Drupal |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes