I need to close the popup windows in the following after 3 seconds. How do I do it.
Creating a global variable and reuse it in our code.
var info = function (text, onClose, headerText) {
if (!headerText)
headerText = "Info";
alert(text, null, onClose, headerText, true);
}
// Call this in own code where ever you need
info("Message that going to close automatic.");
hidePopUpMessage();
// callback function to showing 3 sec.
function hidePopUpMessage() {
setTimeout(function () {
$("#pp-alert-close").click();
//$("#popup-close").click();
}, 3000);
}