js execute something after delay code example
Example 1: javascipt delay
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
console.log("Hello");
sleep(2000).then(() => { console.log("World!"); });
Example 2: settimeout function
setTimeout(function(){
$('#overlay'). modal('hide')
}, 5000);
//#overlay will be the ID of modal which you want to hide or show modal