Pure JavaScript Library For iOS Style Popup Boxes – Alert7.js

Category: Javascript , Notification | July 27, 2016
AuthorWildtyto
Last UpdateJuly 27, 2016
LicenseMIT
Tags
Views4,522 views
Pure JavaScript Library For iOS Style Popup Boxes – Alert7.js

Alert7.js is a lightweight, zero-dependence JavaScript library for creating iOS style alert or confirm dialog boxes on the webpage.

Basic usage:

Just include the Alert7.js script in the html page and we’re ready to go.

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

Create a basic alert dialog.

// Alert7.alert( titleStr, messageStr, btn1Str, btn1Handler, btn2Str, btn2Handler, ... );
Alert7.alert('This is Title');

Create a confirm dialog.

var _alertA = new Alert7();
_alertA.setTitle("Alert7 confirm");
_alertA.setMessage("Right?");
_alertA.setType(Alert7.TYPE_CONFIRM);
_alertA.addAction("No", function(){});
_alertA.addAction("Yes", function(){});
_alertA.present();

You Might Be Interested In:


Leave a Reply