1
2/*
3 * @message {String or DOMElement} The dialog contents.
4 *
5 * alertify.alert(message);
6 *
7 */
8 alertify.alert('Alert Message!');
9
1
2//get the closable setting value.
3var closable = alertify.alert().setting('closable');
4//grab the dialog instance using its parameter-less constructor then set multiple settings at once.
5alertify.alert()
6 .setting({
7 'label':'Agree',
8 'message': 'This dialog is : ' + (closable ? ' ' : ' not ') + 'closable.' ,
9 'onok': function(){ alertify.success('Great');}
10 }).show();
11
1
2/*
3 * @message {String or DOMElement} The dialog contents.
4 * @onok {Function} Invoked when the user clicks OK button or closes the dialog.
5 *
6 * alertify.alert(message, onok);
7 *
8 */
9 alertify.alert('Alert Message!', function(){ alertify.success('Ok'); });
10
1
2/*
3 * @title {String or DOMElement} The dialog title.
4 * @message {String or DOMElement} The dialog contents.
5 * @onok {Function} Invoked when the user clicks OK button or closes the dialog.
6 *
7 * alertify.alert(title, message, onok);
8 *
9 */
10alertify.alert('Alert Title', 'Alert Message!', function(){ alertify.success('Ok'); });
11
1
2/*
3 * @title {String or DOMElement} The dialog title.
4 * @message {String or DOMElement} The dialog contents.
5 *
6 * alertify.alert(title, message);
7 *
8 */
9 alertify.alert('Alert Title', 'Alert Message!');
10