Skip to content

n2ref/coreui-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreUI Alert

DEMO

Install with npm

$ npm install coreui-alert

Example

<button id="alert-default" class="btn btn-secondary">Default</button>
<button id="confirm-default" class="btn btn-secondary">Default</button>

<script>
    $('#alert-default').click(function () {
        CoreUI.alert.default("Alert title", "Raw denim you probably haven't heard of them jean shorts Austin?");
    });

    $('#confirm-default').click(function () {
        CoreUI.alert.default(
                "Confirm title",
                "Raw denim you probably haven't heard of them jean shorts Austin?",
                {
                    btnAcceptText: "Ok",
                    btnAcceptEvent: function () { console.log('Ok') },
                    btnRejectText: "Cancel",
                    btnRejectEvent: function () { console.log('Cancel') }
                }
        );
    });
</script>

Result

Alert