Simple Top Notification Plugin with jQuery - firework.js

Simple Top Notification Plugin with jQuery - firework.js
File Size: 3.49 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

firework.js is a small jQuery plugin which provides a simple way to display various notification messages on the top of your web project.

Install:

Load jQuery library and the jQuery firework.js plugin's script & CSS in your web project.

<link href="jquery.firework.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="jquery.firework.js"></script>

API:

Show notification message with specified text, type and duration.

  • m: custom notification message
  • t: (optional) message type ('success', 'danger')
  • l: (optional) length of time to display message in milliseconds
firework.launch(m,t,l);

Available types. You can add more custom notification types as in jquery.firework.css.

// default
firework.launch('Hello World');

// success
firework.launch('Hello World', 'success');

// danger
firework.launch('Hello World', 'danger');

// warning
firework.launch('Hello World', 'warning');

// sticky
// requires jQuery cookie plugin
firework.sticky('Hello World', 'success')

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