Skip to content

Instantly share code, notes, and snippets.

@kylefox
Created April 16, 2014 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kylefox/10913825 to your computer and use it in GitHub Desktop.
Save kylefox/10913825 to your computer and use it in GitHub Desktop.
Close jquery-modal 5 seconds after being opened.
// Attach an event handler to when the modal is opened.
$(document).on($.modal.OPEN, function(event, modal) {
// Use setTimeout to close the modal in 5 seconds (5000 milliseconds).
setTimeout(function() {
$.modal.close();
}, 5000);
});
@alexshirnin
Copy link

fsf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment