有没有办法让jquery在mouseout事件触发之前等待一段时间?Jquery - 延迟鼠标事件
它现在发射得太早了,我更愿意等待500ms后再评估鼠标。下面我使用的代码示例。
$('.under-construction',this).bind({
mousemove: function(e) {
setToolTipPosition(this,e);
css({'cursor' : 'crosshair' });
},
mouseover: function() {
$c('show!');
showUnderConstruction();
},
mouseout: function() {
$c('hide!');
hideUnderConstruction();
},
click: function() {
return false;
}
});
是否有jQuery的方式来做到这一点,或者我将不得不自己做?
showUnderConstruction()延迟(500)。 hideUnderConstruction()。delay(500); – ant