Home Bootstrap Delete confirm modal by using bootstrap in JQuery

Delete confirm modal by using bootstrap in JQuery

by Shahriar Sagor

Today now in this post i will show you how to Delete confirm modal by using bootstrap in JQuery? We always need to ask confirmation for the remove items. Here I mean we always need to ask before deleting items. So if we need to ask confirm before to do something like delete, change status, change value etc as we require. If we want to do with the better layout then we have to choose bootstrap.js and if we already use thee bootstrap then it’s very better.

so, let’s see the bellow example and use it.


<html lang="en">
    <title>Delete confirm modal using bootstrap example</title>  
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>  

<button class="btn btn-danger remove">Delete</button>

<!-- bootbox code -->
<script src="https://raw.githubusercontent.com/makeusabrew/bootbox/gh-pages/bootbox.js"></script>  
    $(document).on("click", ".remove", function(e) {
        bootbox.confirm("Are you sure you want to delete?", function(result) {
              console.log('write code of remove item.');


Read Also : How to convert Object into Array in PHP?

Thanks for read. I hope it help you. For more you can follow us on facebook.


You may also like