Tech blog & Web labs
jui_alert is a jQuery plugin, provides simple notification (with timeout and close button). jQuery UI themes compatible. Localization support.
Compatible with modern web browsers. Tested with: Google Chrome, Mozilla Firefox, Microsoft Internet Explorer >= 8, (default) Android browser.
PROJECT HOME: http://pontikis.net/labs/jui_alert
DEMO: http://pontikis.net/labs/jui_alert/demo
DOCUMENTATION: http://pontikis.net/labs/jui_alert/docs
SUPPORT FORUM: http://pontikis.net/bbs
SOURCE REPOSITORY: https://github.com/pontikis/jui_alert
JQUERY PLUGIN REGISTRY: http://plugins.jquery.com/jui_alert/
NuGet GALLERY: https://nuget.org/packages/jui_alert/
Copyright © Christos Pontikis http://pontikis.net
License MIT
Requires
Tested with jquery >=1.8.2 and jquery-ui >= 1.8.23.
Current Release 2.0.0 (26 Jan 2013) Download here.
CHANGELOG here.
Syntax highlight using http://alexgorbatchev.com/SyntaxHighlighter/
<link rel="stylesheet" type="text/css" href="/path/to/jqueryui_theme/jquery-ui.css"> <link rel="stylesheet" type="text/css" href="/path/to/jquery.jui_alert.css"> <!-- if custom classes used --> <link rel="stylesheet" type="text/css" href="/path/to/custom.css"> <script type="text/javascript" src="/path/to/jquery.js"></script> <script type="text/javascript" src="/path/to/jquery-ui.js"></script> <script type="text/javascript" src="/path/to/jquery.jui_alert.min.js"></script> <script type="text/javascript" src="/path/to/i18n/en.js"></script>
$("#element_id").jui_alert({ message: 'your message' })
$("#element_id").jui_alert({ message: 'your message', // REQUIRED // DEFAULTS timeout: 2500, containerClass: "ui-widget", buttonsAreaClass: "jui_alert_buttons_p", btnCloseClass: "jui_alert_btn_close ui-icon ui-icon-closethick", btnTimerOnClass: "jui_alert_btn_timer ui-icon ui-icon-pin-w", btnTimerOffClass: "jui_alert_btn_timer ui-icon ui-icon-pin-s", messageAreaClass: "jui_alert_message_area ui-state-highlight ui-corner-all", messageBodyClass: "jui_alert_message_body", messageIconClass: "jui_alert_icon ui-icon ui-icon-info", close_btn_id_prefix: "close_", timer_btn_id_prefix: "cancel_timer_", use_effect: "" // one of "slide", "bounce", "shake", "pulsate" (http://jqueryui.com/effect) })
$("#element_id").jui_alert('getDefaults');
$("#element_id").jui_alert('getOption', 'option_name');
$("#element_id").jui_alert('getAllOptions');
$("#element_id").jui_alert('setOption', 'option_name', option_value, reinit);
Alternative way to set one or more options
$("#element_id").jui_alert({option1_name: option1_value, etc});
$("#element_id").jui_alert('refresh');
$("#element_id").jui_alert('destroy');