Display timed notifications easy
<script>
Jackbox.init();
</script>
<script>
Jackbox.error("Oh noes, something went wrong!");
Jackbox.warning("Yeah, you might want to check in to that");
Jackbox.success("Woop woop!");
Jackbox.information("I'm only here because I can");
</script>
<script>
var notificationCustomSettings = {
time : 20,
classNames: ["long-notification-class"]
};
Jackbox.information('Im a custom setting message!',notificationCustomSettings);
</script>
<script>
var customSettings = {
notification: {
time : 10, //in seconds, default is set to 5
classNames : ["custom-class-name", "another-class-name"] //Array of classes
}
}
Jackbox.init(customSettings);
</script>
The file jackbox.polyfills.js can be used for modern browser support. IE8 and less, needs to use polyfill for Array.prototype.forEach