Alert v 1.0
Handles alert boxes
Options
option | default | possible values | description | since | info |
---|---|---|---|---|---|
speed | 500 | integer | defines the duration of the closing animation | 1.0 | |
sticky | false | true | false | if set to true alertbox can't get hidden | 1.0 | |
onBeforeClose | function(){} | function(element) | callback before the box get closed. Can return false to prevent closing. | 1.0 | |
onClose | function(){} | function(element) | callback after the box is closed | 1.0 |
Methods
method name | default | arguments | description | since | info |
---|---|---|---|---|---|
close | closes the alert box | 1.0 | |||
set | key, value | sets the the option 'key' with the value 'value' | 1.0 |
Usage
$(selector).wl_Alert([options]);
Calling Methods
$(selector).wl_Alert('method', [,arg [,arg]]);
Injecting Alert boxes with javascript
$.wl_Alert('content', 'cssclass', placeToInsert, insertAfter, options);
Markup
<div class="alert warning">Warning</div> <div class="alert success">Success</div> <div class="alert note">Notification</div> <div class="alert info">Information</div> <div class="alert i_airplane purple">Custom Icon and color</div> <div class="alert i_footprint green" data-sticky="true">This is a sticky note!</div>
Examples
Warning
Success
Notification
Information
Custom Icon and color
This is a sticky note!