Using jQuery, display status messages in a consistent and friendly manner.
- About
- Features
- Documentation
- Downloads
Display status messages to users
Categorize messages as information, warnings, or errors
Messages can auto fade or remain until the user clears them (or reloads the page)
Screenshot of end result:
- Simple usage - just pass the message and type of message
- Make the messages sticky or auto clear
- Optionally animate the showing and clearing of messages
- Optionally warn users about old browsers - such as IE6
- And more
Basic status message call
1
2
3
4
5
|
<script type="text/javascript">
$(document).ready( function() {
$.fn.statusmessageQ({"message":"message to show", "type":"info"});';
});
</script>
|
Status message options
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// default options
$.fn.statusmessageQ.defaults = {
'type': 'info', // info|warn|error; matches css
'message': '', // text to display
'occurrences': 0, // number of times message was repeated; only shown if > 0
'timeout': 0, // ms; > 0 to have status msg automatically disappear ie growl
'show': 'fadeIn', // fadeIn|show; animation to use on show
'showtime': 1234, // ms
'hide': 'fadeOut', // fadeOut|hide; animation to use on hide
'hidetime': 1234, // ms
'quick_clear': false, // true|false; true - clear all messages; false - clear/hide each message
'target': 'body', // target selector to append messages too; '#target', '.target'
'decode': true // true|false; if msg has been uri encoded; should be safe to keep true
}; // end $.fn.statusmessageQ.defaults{}
|
Warn about old browser call
1
2
3
4
5
6
7
8
|
<script type="text/javascript">
$(document).ready( function() {
$.fn.statusmessageQ.waob({
'waob': true,
'waob_once': true
});
});
</script>
|
Warn about old browser options
1
2
3
4
5
6
7
|
$.fn.statusmessageQ.defaults_waob = {
'waob': true, // true|false; warn_about_old_browser;
'waob_once': false, // true|false; true use cookie and run only once - requires $.cookie; false use waob_nag
'waob_nag': 5, // 0-100; percent chance to nag user about old browser;
'waob_msg': 'Your browser (<browser/> <version/>) is out of date. It may not display all features of this and other websites. <download>Grab the latest <browser/></download>',
'waob_msg_ancient': 'Your browser (<browser/> <version/>) is really out of date. It WILL NOT display all features of this and other websites. <download>Grab the latest <browser/></download>'
}; // end $.fn.statusmessageQ.defaults_waob{}
|
File:
Download
Version: 0.5
Released: 2010-06-17
File:
Download
Version: 0.4
Released: 2010-03-16