Simplest Modal-style Alert Box Plugin With jQuery - Modal Alert

File Size: 4.15 KB
Views Total: 3349
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simplest Modal-style Alert Box Plugin With jQuery - Modal Alert

Modal Alert is an extremely tiny jQuery plugin for displaying a modal-style alert dialog box with subtle CSS3 transition-timing effects on your screen.

How to use it:

1. Include the required CSS file modal-alerts.css in the document's head section.

<link rel="stylesheet" href="modal-alerts.css">

2. Include jQuery library and the JavaScript file modal-alerts.js at the end of the document.

<script src="//code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="modal-alerts.js"></script>

3. Display a modal alert with custom message & title on your screen.

alerts.show({ 
  title: 'Alert Title', 
  message: 'Alert Message' 
});

4. Hide the modal alert manually.

alerts.hide();

5. Add a custom icon to the modal alert.

alerts.show({ 
  icon: "alert.png",
  title: 'Alert Title', 
  message: 'Alert Message' 
});

6. Add an extra CSS class to the modal alert.

alerts.show({ 
  icon: "alert.png",
  title: 'Alert Title', 
  message: 'Alert Message',
  css: "error"
});

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