0

I'm trying to get the jquery plugin hoverIntent to work on my Drupal 7 installation. No luck.

1st, I tried the logical approach; simply the following to the theme .info file. scripts[] = js/jquery.hoverintent.js Doesn't work, and causes other problems.

Then I tried the contrib hoverIntent module. I can see that the script is loaded on the page, but calling .hoverIntent from within Drupal results in nothing happening.

$(function() {
  $(".views-field-field-profile-picture").hoverIntent(teamIn);
  $(".team-name-info").mouseleave(teamOut);   
});

Anyone with success in getting hoverIntent to work? Why is this so difficult?

1 Answer 1

0

Found it. First, you will most likely see an error in the logs like this TypeError: cfg.out is undefined

The problem in my code is not that .hoverIntent wasn't loaded, it was that that method requires two parameters. (Obvious error)

Solution:

$(function() {
  $(".views-field-field-profile-picture").hoverIntent(teamIn, function(){});
  $(".team-name-info").mouseleave(teamOut);   
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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