我一直在努力使用JQuery Hoverintent插件,我已经取得了一些不错的进展,但我也有一个问题,使用.hide,.slideUp等,使用out:函数来确保hoverintent的叠加层滚入时并不会立即消失。目前我还没弄清楚为什么要出局:只是让叠加立即消失而没有任何影响。
JQuery的:
$(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:功能运行良好,问题就出来了。有什么建议为什么看起来这个功能不起作用?