Minimalistic jQuery Growl plugin v0.1

Download

jquery.growl.js - Source (1.4 KB)
jquery.growl.min.js - Minified (0.7 KB)

This is a minimalistic implementation of a (yet another) Growl-like jQuery plugin. I wrote this for a specific purpose where I just needed a simple notification box with as little markup as possible.

Feel free to use it and abuse it!

Usage

.notify( options )

options Set of key/value pairs the configure the notification. All options are optional (allthough you would probably want to provide the text option)

text String

The text to be displayed. Can be HTML.

addClass String

Adds the specified class to the notification element.

duration Integer

How long in milliseconds the notification should be visible. Default value is 3000

sticky Boolean

Sets wether the notification should be cleared by the user or automatically. Default value is false

Example

//Creates a self-removing message in "EventContainer" element;
$(document).ready(function() {
  $("#EventContainer").notify({
    text: "Hello World!"
  });
});