testing jquery-confirm

by jimkennelly

HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/craftpip/jquery-confirm/master/css/jquery-confirm.css">
<script src="https://rawgit.com/craftpip/jquery-confirm/master/js/jquery-confirm.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">


<!-- 
// bootstrap 4
// https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css

// bootstrap 3
// https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css  
 -->

JavaScript

var aaa = {buttons: {
        confirm: function () {
            $.alert('Confirmed!');
        },
        cancel: function () {
            $.alert('Canceled!');
        },
        somethingElse: {
            text: 'Something else',
            btnClass: 'btn-blue',
            keys: ['enter', 'shift'],
            action: function(){
                $.alert('Something else?');
            }
        }
    }};
    
$.confirm({
    title: 'Confirm!',
    content: 'Simple confirm!',
    buttons: aaa,
    
});