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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i bootstrap-alertbox

Weekly Downloads

0

Version

1.0.3

License

ISC

Last publish

Collaborators

  • lchild358