3

I can't seem to get hoverIntent plugin to work. It's definitely loading jQuery and hoverIntent. But, .hoverIntent() is "not a function". (.hover() works fine).

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.hoverIntent.minified.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    $('#portfolio-circle').hoverIntent(
        function() {
            $('#portfolio-hover').fadeTo('normal', 1);
            $('#portfolio-caption').fadeTo('normal', 1);
        },
        function() {
            $('#portfolio-hover').fadeTo('normal', 0);
            $('#portfolio-caption').fadeTo('normal', 0);
        }
    );
});
</script>
celwell
  • 1,634
  • 3
  • 19
  • 27
  • 1
    Do you see any js error on page load other than this error? – ShankarSangoli Aug 01 '11 at 19:53
  • *"It's definitely loading...hoverIntent."* How did you verify this? What happens if you (temporarily) use a direct link to the file hosted by the developer? http://cherne.net/brian/resources/jquery.hoverIntent.minified.js – user113716 Aug 01 '11 at 20:04
  • There are no other js errors. The hoverIntent js file is definitely loading because firebug shows it as loaded under the "Net" tab. – celwell Aug 01 '11 at 20:28

1 Answers1

15

Check whether you are referencing two different versions of jquery by mistake. I faced a similar error with jqueryui where everything was loading fine, but I realized later that there were two different versions of jquery being referenced.

shashi
  • 4,616
  • 9
  • 50
  • 77
  • You're right. The CMS I'm using automatically loaded its own (earlier) version of jQuery. Thanks for pointing me in the right direction. – celwell Aug 02 '11 at 13:44
  • It should be nice if jQuery makes a check if a previous version is already defined.. thank you for the help – Matteo Conta Nov 14 '14 at 09:04