This project was heavily inspired by humanmsg project for jQuery. I really liked the project but I wanted to remove the jQuery dependency, add support for CSS transitions, and have more control over the timing.
Humane JS tries to be as unobtrusive as possible to the user experience while providing helpful information that is clear and grabs the users attention. It is framework independent. Customizable.
You can see a demo here
I personally have tested IE 6+, Firefox and Chrome, but there is support for Opera and Safari that has been accounted for. Please let me know if you have any issues. I believe the following is safe to use:
- Chrome 9+
- Firefox 3+
- Internet Explorer 6+
- Opera 10+
- Safari 3+
Simply include the JS and CSS file on your page.
Humane adds a
humane function to the global scope that you simply call
You also can use HTML
humane('<span style="color:red">oh no!</span>');
Humane is very simple, only the timeout before the popup disappears is configurable
humane.timeout = 2000
Default timeout is 2 seconds.
I know improvements could be made, please help! This is just getting started. My goal is to keep the system very simple and small.
(The MIT License)
Copyright (c) 2010 Marc Harter <email@example.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.