以下代码在执行悬停功能时扩展了 DIV 的高度,如果将鼠标放置 5 秒,我如何更改代码以便必须执行该功能。另外我怎样才能减慢滑动速度?
$(document).ready(function () {
$("#myhead").hover(
function () {
$(this).animate({
height: '+=250'
}, '1000');
}, function () {
$(this).animate({
height: '-=250px'
}, '1000');
});
});