Create Alert Notifications Using Bootstrap Alerts - BootsAlert

Create Alert Notifications Using Bootstrap Alerts - BootsAlert

BootsAlert is a lightweight jQuery plugin which lets you create customizable alert notifications using Bootstrap alerts component.

Supports both Bootstrap 4 and Bootstrap 3.

1. Include jQuery and Bootstrap 4 (or Bootstrap 3) framework on the webpage.

<link rel="stylesheet" href="" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

2. Download and include the jQuery BootsAlert plugin after jQuery.

<script src="bootsalert.min.js"></script>

3. Create a container in which you want to place the notification.

<div id="demo"></div>

4. Generate a custom alert notification inside the container. All possible parameters:

  • className: Bootstrap alert class, like success, info, ..., or use your own custom class
  • message: Message that will displayed to user
  • container: Alert will be inserted to this container. Must have an unique id.
  • closebtn: If true, alert will have a close button.
  • append: Bootsalert can be appended with several alert elements.
  className: "success",
  message: "Alert Message",
  container: "demo",
  closebtn: true

This awesome jQuery plugin is developed by dhanyn10. For more Advanced Usages, please check the demo page or visit the official website.

  • Publication date: 04.09.2018
  • Source