Cfg.hover error with jQuery hoverIntent plugin

I am trying to use the hoverIntent plugin to delay some animation effects on progress bars. However, for some reason, hoverIntent doesn't seem to work at all.

My page title has it all (all paths checked):

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="campaign-resources/_js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="campaign-resources/_js/jquery.hoverintent.js"></script>
<script type="text/javascript" src="campaign-resources/_js/sitewide.js"></script>

In sitewide.js, I run the following:

$(".cause-block").hoverIntent(function() {
    var originalWidth = $(this).find(".cause-chart-achieved").css("width");
    var chartParams = { width: originalWidth };
    $(this).find(".cause-chart-achieved").css("width", "0");
    $(this).find(".cause-chart-achieved").animate(chartParams, "slow", "easeInOutSine");
});

But when I hover over the corresponding div, nothing happens in the browser, and the following errors are displayed on the console:

"cfg.over undefined" and "cfg.out is undefined"

"" jQuery, . , , HTML JS . , , JS, .

? !

+3
1

hoverIntent 2 , do

$(".cause-block").hoverIntent(function() {
    var originalWidth = $(this).find(".cause-chart-achieved").css("width");
    var chartParams = { width: originalWidth };
    $(this).find(".cause-chart-achieved").css("width", "0");
    $(this).find(".cause-chart-achieved").animate(chartParams, "slow", "easeInOutSine");
},
function(){});
+4

Source: https://habr.com/ru/post/1716731/


All Articles