Dialog v 1.1
Replaces the nativ Dialogs, Alertboxes Confirmations and Promptboxes with the jQuery UI dialog
Options
| option | default | possible values | description | since | info |
|---|---|---|---|---|---|
| nativ | false | true | false | Use nativ dialogs instead of jQuery | 1.0 | |
| text | texts | object | all used text. Header, OK button, Cancel Button | 1.0 | |
| Check out the jQuery dialog options for the all options | |||||
Methods
Methods are not available on native dialogs!
| method name | default | arguments | description | since | info |
|---|---|---|---|---|---|
| setHeader | '' | String | Sets the Header of the message | 1.1 | |
| setBody | '' | String | Sets the Body of the message | 1.1 | |
| close | null | function | closes the messagebox. Argument can be a callback function which get'S trigger after the message is closed | 1.1 | |
| closeAll | null | function | closes all open messagebox. Argument can be a callback function which get'S trigger after the message is closed | 1.1 |
Usage
$.alert('This is a simple Message');
$.prompt('text', 'inputvalue', [callback [,cancelcallback]);
$.confirm('text', [callback [,cancelcallback]);
Usage with public methods
var dialog = $.alert('This message can be accessed via public methods');
dialog.setHeader('Set a header');
dialog.setBody('Set a Body');
dialog.close(function(){ // callback function });
Examples
use
nativ = (window.navigator.standalone === undefined) ? true : false to use nativ dialogs only on iOSMessages v 1.1
Displays a message on the top right corner
Options
| option | default | possible values | description | since | info |
|---|---|---|---|---|---|
| header | null | String | Defines the Header of the message | 1.0 | |
| live | 5000 | integer | Defines the lifetime in milliseconds | 1.0 | |
| topoffset | 90 | integer | Defines the top offset of the boxes if the window isn't scrolled | 1.0 | |
| fadeTime | 500 | integer | Defines the time to fade out the boxes in milliseconds | 1.0 | |
| sticky | false | true | false | ignores the lifetime. A click on the close button is required | 1.0 |
Methods
| method name | default | arguments | description | since | info |
|---|---|---|---|---|---|
| setHeader | '' | String | Sets the Header of the message | 1.1 | |
| setBody | '' | String | Sets the Body of the message | 1.1 | |
| close | null | function | closes the messagebox. Argument can be a callback function which get'S trigger after the message is closed | 1.1 | |
| closeAll | null | function | closes all open messagebox. Argument can be a callback function which get'S trigger after the message is closed | 1.1 |
Usage
$.msg('This is a simple Message');
$.msg("This Message will stay until you click the cross",{sticky:true});
$.msg("This is with a custom Header",{header:'Custom Header'});
$.msg("This stays exactly 10 seconds",{live:10000});
Usage with public methods
var message = $.msg('This message can be accessed via public methods');
message.setHeader('Set a header');
message.setBody('Set a Body');
message.close(function(){ // callback function });