Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 846 Bytes

README.md

File metadata and controls

45 lines (39 loc) · 846 Bytes

jQuery Confirm Action

screenshot

Getting Started

<script type="text/javascript" src="./jquery.confirm-action.js"></script>
$('.my-button').confirmAction({
    title: {
        text: 'Whoa!'
    },
    message: {
        text: 'You are about to do a bad thing, are you sure?'
    }
});

Advanced Usage

$('.my-button').confirmAction({
    title: {
        html: [
            '<i class="fa fa-warning"></i><br />',
            'Stop right there!'
        ],
        style: 'danger'
    },
    message: {
        html: 'You are about <strong>delete the internet</strong>, are you sure?'
    },
    actions: {
        confirm: {
            text: 'Go Ahead',
            callback: function(confirm, cancel) {
                confirm();
            }
        }
    }
});