jQuery Confirm

A simple script that opens confirmation popup before triggering action on button click. (e.g. on deleting)

List of the options:

  • text: Text to display in the dialog
  • title: Title of the dialog (can be empty, the dialog will not have a header then)
  • confirm: Handler executed when the user confirms
  • cancel: Handler executed when the user cancels
  • confirmButton: Label of the confirm button
  • cancelButton: Label of the cancel button
  • post: If false (default) and no confirm handler is set, redirects the user to the URL of the button/link with a GET request. If true, redirects with a POST request (like a form submission).
  • submitForm: If false (default) it has no effect. If true, it submit the form target element.
  • confirmButtonClass: HTML class for the confirmation button, defaults to btn-primary.
  • cancelButtonClass: HTML class for the cancel button, defaults to btn-default.
  • dialogClass: HTML class for the dialog, defaults to modal-dialog.

Example