Jquery pop up confirm Bootbox Bootstrap

<!DOCTYPE html>
    <meta charset="utf-8">
    <title>My page</title>
    <link rel="stylesheet" type="text/css" href="../assets/css/bootstrap.min.css">

    <!-- JS dependencies -->
    <script src="../assets/js/jquery.js"></script>
    <script src="../assets/js/bootstrap.min.js"></script>
    <a class="btn btn-mini btn-danger lnk-delete" data-toggle="modal"
       href="#delete-confirm" data-data="Sebuah Data"
       <i class="icon-remove icon-white"></i>Delete</a>
    <!-- bootbox code -->
    <script src="../assets/js/bootbox.js"></script>
    $(document).ready(function() {
        $('a[href=#delete-confirm]').click(function(e) {
          //var data = $(this).data('data');
          //var data = $(this).data('data');
          //alert(url+" "+data);

          //Link untuk menghapus
          var url = $(this).data('url');
          bootbox.dialog('Anda yakin akan menghapus data?', [{
                         'class':'btn btn-danger',
                         'icon':'icon-trash icon-white',
                         'callback':function() {
                                return location.href = url;



source code dapat di unduh di sini


2 thoughts on “Jquery pop up confirm Bootbox Bootstrap

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s