ToastrJS is a JavaScript library for Gnome / Growl type non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.
npm install toastr-stylus2.0.2-0.1.0.#### Debug
- //cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/js/toastr.js
- //cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/css/toastr.css
#### Minified
- //cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/js/toastr.min.js
- //cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/css/toastr.min.css
options.fadeIn with options.showDurationoptions.onFadeIn with options.onShownoptions.fadeOut with options.hideDurationoptions.onFadeOut with options.onHidden###3 Easy Steps
For other API calls, see the demo.
1. Link to toastr.css
2. Link to toastr.js
3. use toastr to display a toast for info, success, warning or error
// Display an info toast with no title
toastr.info('Are you the 6 fingered man?')
toastr.options.closeButton = true;
Optionally override the close button's HTML.
toastr.options.closeHtml = '';
You can also override the CSS/LESS for #toast-container .toast-close-button
toastr.options.newestOnTop = false;
####Easings
Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery.
toastr.options.showEasing = 'swing';
toastr.options.hideEasing = 'linear';
Using the jQuery Easing plugin (http://www.gsgd.co.uk/sandbox/jquery/easing/)
toastr.options.showEasing = 'easeOutBounce';
toastr.options.hideEasing = 'easeInBack';
####Animation Method
Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
toastr.options.showMethod = 'slideDown';
toastr.options.hideMethod = 'slideUp';
To build the minified and css versions of Toastr you will need node installed.
Install the Grunt command line. This might require sudo.
``shell`
npm install -g grunt-cli
Then, from the main project folder run this command. This should not require sudo.
`shell`
npm install
At this point the dependencies have been installed and you can build Toastr
`shell``
grunt
+ http://twitter.com/hfjallemark
John Papa
+ http://twitter.com/John_Papa