Skip to main content
4 of 4
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/

How to (reliably) add jQuery plugin to Drupal

enter image description hereThis question has been asked, but not really answered. It is NOT as simple as has been suggested in

This response

If it were, there would be no reason to have a module like jquery_plugin

Simply putting a line in the theme info file like

scripts[] = js/jquery.scrollme.js

Does not work. In the case above, the script does actually show up on the rendered page, but the function(s) within it result in "undefined".

In the case of scrollme.js, are there dependencies that need to be included?

I fought this thing with hoverintent for a day or two, and finally just punted and added the module "hoverintent". And incidentally, the fact that the hoverintent module exists suggests strongly that one can not simply throw the hoverintent.js code into a directory and load it with a script from the theme info file.

Any experienced direction would be really appreciated!

sea26.2
  • 1k
  • 11
  • 27