growl like notifications for your website
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
.DS_Store
.gitignore
History.md
Makefile
Readme.md
component.json
index.js
notification.css
template.html
template.js
template.mustache

Readme.md

notification

VERY simple, small notifications module all in vanilla JS. Should work in IE 8+.

Installation

$ component install bmcmahen/notification

Use

For an example, check example.html in the examples folder. 
// expose the notify variable
var notify = require('notification');

// construct the notification
notify([attributes, options])

// example
notify({
  title: 'Error',
  content: 'You entered an invalid password',
}, {
  duration: 6000
});

// You can pass in your own compiled template function

var template = // Your template function here. 
notify({
    title: 'Success',
    content: 'It worked!',
    custom: 'custom1'
  }, {
  	duration: 3000,
  	template: template
  });

License

MIT