I’m trying to use lightbox_me as a message alert but, I’m having some problems getting the element to close after a few seconds. Is this possible?
Here’s my code
$('#message').lightbox_me({
centered: true,
closeSelector: "#close-message",
overlayCSS:{background: 'black', opacity: .8},
onLoad: function() {
$('#message').find('input:first').focus()
$ele.lightbox_me();
}
});
Ended up using this after help from Dunli, thanks
// test message
$('#message').lightbox_me({
centered: true,
overlayCSS:{background: 'black', opacity: .8},
onLoad: function() {
$('#message').find('input:first').focus()
setTimeout(lightbox, 5000);
function lightbox() {
$('#message').trigger('close');
}
}
});
Try this: