Simple Plain Dialog Popup Plugin For jQuery - Alerts.js

File Size: 13.1 KB
Views Total: 9415
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Simple Plain Dialog Popup Plugin For jQuery - Alerts.js

Alerts.js is a simple plain jQuery plugin that creates customizable popup boxes to replace the default loading, alert, dialog, confirm and prompt dialog boxes.

How to use it:

1. Just load jQuery library together with the jQuery alerts plugin's files and we're ready to go.

<!-- Dependencies -->
<script src="//"></script>

<!-- Core files -->
<script src="jquery.alerts.js"></script>
<link href="jquery.alerts.css" rel="stylesheet">

2. Create a basic alert dialog.

// jAlert(message, title, callback)
jAlert('This is a custom alert box', 'Alert Dialog');

3. Create a confirmation dialog.

// jConfirm(message, title, callback)
jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
  jAlert('Confirmed: ' + r, 'Confirmation Results');

4. Create a prompt dialog.

// jPrompt(message, title, callback)
jPrompt('Type something:', 'Prefilled value', 'Prompt Dialog', function(r) {
  if( r ) alert('You entered ' + r);

5. Create a loading dialog to indicate the loading status.

// jLoad(message, title, callback)
jLoad('This is a custom load box', 'Load Dialog');

6. The plugin also supports html content embedded in the message.

jAlert('You can use HTML, such as <strong>bold</strong>, <em>italics</em>, and <u>underline</u>!');

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