Bootstrap 4 Confirm Popup Plugin – BootConfirm.js

Form
Demo    Download
Bootstrap 4 Confirm Popup Plugin - BootConfirm.js
File Size: 10.37 KB
Views Total: 179 views
Last Update:October 2, 2020
Publish Date: October 2, 2020
Official Website: Go to website
License: MIT

The BootConfirm.js Confirm popup is set of reusable element made of twitter bootstap & jquery. it is a tiny and simple-to-use jQuery plugin that creates a Bootstrap based. Whenever you found responsive & reusable javascript confirm, you can use this plugin. It has all you need for any confirmation user action like title , content , callback events, submitting a form, deleting an item, etc.

How to use :

1. Load the BootConfirm.js script and jQuery library in the HTML page.

<link rel="stylesheet" href="/bootstrap.min.css" />
<script src="/jquery.slim.min.js"></script>
<script src="/bootstrap.min.js"></script>
<script src="/BootConfirm.js"></script>

2. Attach the confirm modal to an action button.

<button class="simple">
  Delete
</button>

3. Customize the confirmation message.

$(".simple").BootConfirm({
  message: 'Are you sure to delete this item?'
});

4. Perform an action when you click the OK button.

$(".simple").BootConfirm({
  complete: function(){
    alert('Confirmed')
  }
});

5. Attach the confirm modal to a form submit button and validate the form.

<script src="/jquery.validate.min.js"></script>
<form action="#">
  <label for="email">Email address:</label>
  <input type="email" id="email" />
  <label for="pwd">Password:</label>
  <input type="password" id="pwd" />
  <button type="submit">Submit</button>
</form>
$(":submit").BootConfirm({
  validateForm:true
});

Done


Nola Arney

Nola Arney is a full stack web developer who has worked at companies of various shapes and sizes, and with technologies just as diverse. Her ambition for development is only matched by his desire to find the perfect meme for every occasion.