Sliding Confirm Dialog Plugin with jQuery and Bootstrap - Confirm

Sliding Confirm Dialog Plugin with jQuery and Bootstrap - Confirm
File Size: 367 KB
Views Total: 2882
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

Confirm is a jQuery plugin used to popups an animated and heavily customizable confirm dialog box styled with Bootstrap modal component.

How to use it:

1. Include jQuery library, Bootstrap 3 framework and the jQuery confirm plugin in the document. 

<link href="//" rel="stylesheet">

<script src="//"></script>
<script src="jquery.confirm.js"></script>
<script src="//"></script>

2. Create a link or button to trigger a confirm dialog.

<a id="demo" href="">Click me</a>

3. Call the plugin with default options to trigger a simple confirm dialog box sliding from the top of the web page. Once you click on the 'Yes' button, the current page will go to the URL specified in the href attribute.


4. Customize the confirm dialog via JS.


  // Title of the confirm dialog
  title:"Delete confirmation",

  // Text to display in the confirm dialog
  text:"Are you really really sure?",

  // Handler executed when the user confirms
  confirm: function(button) {
    alert("You just confirmed.");

  // Handler executed when the user cancels
  cancel: function(button) {
    alert("You aborted the operation.");

  // Label of the confirm button
  confirmButton: "Yes",

  // Label of the cancel button
  cancelButton: "No"


5. Customize the confirm dialog via Html5 data-* attributes.

<a id="demo" href=""
   data-title="Hello there!" 
   Click me


Change logs:


  • Change options overriding order.


  • Fix submitForm options behaviour


  • use closest to find form



  • add a cancelButtonClass option which allows to add custom cancel button class

This awesome jQuery plugin is developed by myclabs. For more Advanced Usages, please check the demo page or visit the official website.