我想将slideOutItem延迟500毫秒。无法做到这一点。
if(current === idx) {
slideOutItem($menuItems.eq(current), false, 250, 'easeOutQuint', true);
current = -1;
}
答案 0 :(得分:2)
像这样的东西
if(current === idx) {
setTimeout(function () {
slideOutItem($menuItems.eq(current), false, 250, 'easeOutQuint', true);
} , 500);
current = -1;
}
答案 1 :(得分:0)
function delayed_one ()
{
if(current === idx) {
slideOutItem($menuItems.eq(current), false, 250, 'easeOutQuint', true);
current = -1;
}
}
setTimeout ( delayed_one, 500 );