Introduction
Smoke.js is a replacement of browser's default alert system for Javascript. If you want to standardize Javascript alert box across different browsers and platforms, Smoke.js is the plugin you are looking for. Smoke.js is a lightweight and flexible Javascript plugin that does just that - replace the existing alert, confirm, prompt and a new addition - signal which display an alert box and hide it after a few seconds. It's fully made with HTML and CSS3 so you will able to style it up and make a custom alert box that visually matched with your website.
Features
- Signal: Message appear for a few seconds
- Alert: Normal alert box
- Confirm: Alert box with Yes & No buttons
- Prompt: Alert box with input field.
- Support callback event
- Lightweight, and easy to skin
- Work on all browsers including Mobile platform (IE6 usable, no animation)
Example
Alert
smoke.alert('This is a normal alert... nothing fancy', {}, function(){ // oh what now? });
Confirm
smoke.confirm('You are about to destroy everything. Are you sure?',function(e){ if (e){ smoke.alert('OK pressed'); }else{ smoke.alert('CANCEL pressed'); } });
Prompt
smoke.prompt('what\'s my name?',function(e){ if (e){ smoke.alert('my name is '+e); }else{ smoke.alert('no'); } });
Signal
smoke.signal('this goes away after a few seconds... 5 seconds in fact');
SPECIFICATIONS & DOWNLOAD
- Official Website / Demo / Download
- Plugin Category: Form
- Requirement: CSS3 Support
- Compatibility: Most Browsers including IE6 (Except CSS3 Visual Effect)
- License: MIT License
Comments will be moderated and
rel="nofollow"
will be added to all links. You can wrap your coding with[code][/code]
to make use of built-in syntax highlighter.