Skip to main content
1 of 3
michael
  • 111
  • 3

How to use standard drupal 7 farbtastic component? jQuery error

So,

this is my code:

  drupal_add_library('system', 'farbtastic');

I've added it to a page callback function (also tried putting in an implementation of hook_page_alter). It doesn't seem to initialize properly, it fails on the first line of the system library farbtastic,

"Uncaught TypeError: Cannot read property 'farbtastic' of undefined"

Has anyone had this issue before? Any ideas? I get the sense I'm doing something wrong because farbtastic is part of drupal core now...

michael
  • 111
  • 3