jQuery Meow
A plugin to provide Growl-like notifications. Will support bindings for various jQuery events and ability to 'meow' the content of a bound element (e.g. a Rails flash on load) or a message passed as an argument (e.g. button clicks).
Usage example
var options = { title: 'Meow Example', message: 'Hello, World!', }; $.meow(options);
See more examples.
Options
Key | Type | Default | Description |
---|---|---|---|
message | String, Object | null | Either a string or a jQuery selected element. If it's an element, Meow will use its value, innerHTML or innerText depending on its type. |
title | String | null | If a string is given, the meow's title will reflect it. However, if you do no set this and use a selector element in message , it will default to the title attribute of that element if available. |
icon | String | null | Sets the image URL for the icon |
duration | Number | 5000 | Sets the duration of of the meow in milliseconds. Any positive, numeric value (including Infinity ) is acceptable. |
sticky | Boolean | false | Sets the meow to never time out. Has the same effect as setting duration to Infinity . |
closeable | Boolean | true | Determines whether the meow will have a close (×) button. If false , yout must rely on the duration timeout to remove the meow. |
container | String | null | Sets the root element the meow should be contained within. Be default, meows will be put in an auto-generated container. |
beforeCreateFirst | Function | null | Gets called just before the first meow on the screen is created. |
beforeCreate | Function | null | Gets called just before any meow is created. |
afterCreate | Function | null | Gets called right after a meow is created. |
onTimeout | Function | null | Gets called whenever a meow times out. |
beforeDestroy | Function | null | Gets called just before a meow gets destroyed. |
afterDestroy | Function | null | Gets called right after a meow gets destroyed. |
afterDestroyLast | Function | null | Gets called after the last meow on the screen is destroyed. |