Mobile-first jQuery Notification & Dialog Plugin - mobiDialog

File Size: 40 KB
Views Total: 974
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Mobile-first jQuery Notification & Dialog Plugin - mobiDialog

mobiDialog is a lightweight jQuery notification plugin which allows you to show mobile-friendly alert dialog popups and informative messages to your users.

Basic usage:

1. Load the required JavaScript and CSS files in your project.

<link href="jquery.mobiDialog-1.0.css" rel="stylesheet">
  ...
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="jquery.mobiDialog-1.0.js"></script>

2. Create a default notification that will be shown in the middle of your screen just as a toast message.

$.fn.mobiDialog();

3. Pass the options to the notification during initialization to create your own notifications.

$.fn.mobiDialog({

  // notification types
  // alert, confirm, prompt, warn
  type : "warn", 

  // message text
  text : "Message Here", 

  // image path to the notification icon
  // false = no icon
  // true = defaut icon
  icon : false,  

  // top, middle or bottom
  position : "middle",

  // timeout
  // for alert notification
  delay : 1500,

  // lock the screen
  lock : false, 

  // text for confirm button
  okText : "Okey",

  // image path to the confirm icon
  okImgUrl : "", 

  // confirm callback
  ok : function(){},  

  // text for cancel button
  cancelText : "Cancel", 

  // image path to the cancel icon
  cancelImgUrl : "", 

  // cancel callback
  cancel : function(){}
  
});

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