How to add delay ?
DuudeXX8 opened this issue · comments
Rauf Heshimov commented
I can't add any delay or setTimeout function please help.
$("#demo02").animatedModal({
modalTarget:'modal-02',
animatedIn:'lightSpeedIn',
animatedOut:'bounceOutDown',
color:'#3498db',
// Callbacks
beforeOpen: function() {
console.log("The animation was called");
},
afterOpen: function() {
console.log("The animation is completed");
},
beforeClose: function() {
console.log("The animation was called");
},
afterClose: function() {
console.log("The animation is completed");
}
});
Eric Li commented
Hello, I have writen the following line in the animatedModal.js
setTimeout(function(){ closeModal() }, 5000);
put it right here, in the afterOpen() function:
function afterOpen () { settings.afterOpen(id); setTimeout(function(){ closeModal() }, 5000); }
Sadiq Siddiqui commented
Replace afterclose() function with below code
function afterClose() {
setTimeout(function()
{
id.css({ 'z-index': settings.zIndexOut,'animation-fill-mode': settings.animationFillModeNone });
settings.afterClose(); //afterClose
}, 200);
}