Nickel Plated Moose

    bootstrap-alertbox

    1.0.3 • Public • Published

    bootstrap-alertbox

    Help to display bootstrap's alert component programmatically in javascript code.

    Install

    npm install bootstrap-alertbox

    Include

    <script src="node_modules/web-module/web-module.js"></script>
    <script src="node_modules/bootstrap-alertbox/bootstrap-alertbox.js"></script>

    Usage

    const falertbox = module.require('bootstrap-alertbox');
    const alertbox = falertbox(container);
     
    alertbox.danger('This is error message');

    Methods

    .danger(message, delay, timeout)###

    .warning(message, delay, timeout)###

    .info(message, delay, timeout)###

    .success(message, delay, timeout)###

    Examples

    <div class="container collapse" id="alert-container"></div>
     
    <button class="btn btn-default" id="alert-display-btn">Display</button>
    const falertbox = module.require('bootstrap-alertbox');
    const alertbox = falertbox('#alert-container');
     
    $('#alert-display-btn').click((e)=>{
        // Display alert message in danger theme, automatically hidden after 5s.
        alertbox.danger('This is error message', undefined, 5000);
    });

    Bugs or feature requests

    Please contact to email

    License

    ISC

    Install

    npm i bootstrap-alertbox

    DownloadsWeekly Downloads

    1

    Version

    1.0.3

    License

    ISC

    Last publish

    Collaborators

    • lchild358