I want to use jQuery UI tooltip in my Drupal7 website.

I have installed 'jquery-update' and 'jquery-plugins' module and added

$(function() {

in js file of my template. But firebug gives this error to me:

$(...).tooltip is not a function

that show the website doesn't find tooltip js file.

Should I do something more to use tooltip jquery ?

  • Can you show us how you added the JS file in your template? – Andrew Dunkle Nov 19 '13 at 21:40

Try adding:

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

in your theme template.php file

 * Implements hook_preprocess_html
  drupal_add_library('system', 'ui.tooltip');

That should ensure the library is available. You can add various conditions to make it page specific as required.

  • 1
    This implies that the jquery_update module shall be enabled – mchar Jul 5 '16 at 15:23

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.