有人可以帮助我如何延迟此功能吗?
$('#customer_quote').lightbox_me({
centered: true,
closeSelect: ".close",
onClose: function(){
$('div.error').remove()
}
})
});
我希望此灯箱在 7 秒后打开。
最佳答案
使用setTimeout()
:
setTimeout(lightbox, 7000);
function lightbox() {
$('#customer_quote').lightbox_me({
centered: true,
closeSelect: ".close",
onClose: function(){
$('div.error').remove()
}
})
});
}
关于javascript - 我怎样才能延迟一个功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11904765/