1

我一直在使用 JQuery Hoverintent 插件,我已经取得了一些不错的进展,但我也有一个问题,使用 .hide、.slideUp 等带有 out: 函数以确保 hoverintent 滚动的覆盖不会不只是在悬停时立即消失。目前我无法弄清楚为什么:只是让覆盖立即消失而没有任何效果。

查询:

$(function satisfactionGaugeHoverIntent() {
    satisfactionConfig = {
        sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)
        interval: 200, // number = milliseconds for onMouseOver polling interval
        timeout: 0, // number = milliseconds delay before onMouseOut
        over: function () {
            $('#satisfactionOverlay').show("drop", { direction: "up" }, 1000);
        },
        // function = onMouseOver callback (REQUIRED)
        out: function () {
            $('#satisfactionOverlay').slideup('slow', 500);
        } // function = onMouseOut callback (REQUIRED)
    }
    $('#satisfactionChartButton').hoverIntent(satisfactionConfig);
});

HTML:

<div id="satisfactionChartButton" class="large-3 large-offset-1 columns modalGaugeArea allGaugesSetup">
    <div class="chartModalTitle">Customer Satisfaction</div>
    <div id="customerSatisfactionGauge" class="gaugeContainer"></div>
    <input id="customerSatisfactionGaugeValue" type="hidden" data-url="@Url.Action(MVC.ATSNavigator.SatisfactionTotalAverageData())" />
    <div class="chartModalDialog">rating out of 5</div>
    <div id="satisfactionOverlay">
        <div class="overlayChartTitle">
            Customer Satisfaction<br />
            Chart
        </div>
        <img class="overlayImages" src="@Url.Content(Links.Content.img.wht_Desktop_Analytics_png)" />
        <div class="overlayChartDialog">Click to View Chart</div>
    </div>
</div>

over: 函数运行良好,out 是问题。有什么建议为什么看起来这个功能不起作用?

4

0 回答 0