Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

bootstrap-auto-dismiss-alert

1.0.2 • Public • Published

Bootstrap auto dismiss alerts

Simple plugin to auto dismiss/close Bootstrap 3.x alert

Usage

Add data-auto-dismiss attribute to alert component.

<div class="alert alert-warning alert-dismissible" data-auto-dismiss role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <strong>Warning!</strong> Better check yourself, you're not looking too good.
</div>

Set custom timeout

By default timeout is 5000ms, it can be overridden.

<div class="alert alert-success" role="alert" data-auto-dismiss="2000">
  Example
</div>

Events

Bootstrap events are triggered since Bootstrap dismiss alert functionality is used. Bootstrap Alerts Javascript Documentation

install

npm i bootstrap-auto-dismiss-alert

Downloadsweekly downloads

20

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability