0

I want to use the jquery "switchClass" in a Drupal 7 Website. I already got the jquery accordion and tabs working, by adding the library in this way:

drupal_add_library('system', 'ui.tabs');

drupal_add_library('system', 'ui.accordion');

Now i'm trying to get switchClass working this way:

drupal_add_library('system', 'ui.switchClass');

... which is not working.

What am i doing wrong?

Thank you for helping!

Lars

1

switchclass() isn't a library, it's a function that's part of UI Effects. So...

drupal_add_library('system', 'effects');

Should then let you use:

$('.foo').switchClass('foo', 'bar', 1000);
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.