Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
vickychijwani committed Aug 28, 2015
1 parent 4992b83 commit 00ed420
Showing 1 changed file with 50 additions and 48 deletions.
98 changes: 50 additions & 48 deletions README.md
@@ -1,34 +1,79 @@
jNotifyOSD
=================

A jQuery-based notification plugin for creating notifications like Ubuntu's Notify OSD ones.
A jQuery-based notification plugin for creating translucent notifications like Ubuntu's Notify OSD ones.

Screenshot:

![jNotifyOSD](https://raw.github.com/vickychijwani/jquery-notify-osd/master/images/screenshot.png "jNotifyOSD")


Examples
--------
```js
// simplest example, default settings
var notif = $.notify_osd.create({ text: 'Hey there!' });

// standard options
var notif = $.notify_osd.create({
'text' : 'Hi!',
'icon' : 'images/icon.png', // icon path, 48x48
'sticky' : false, // if true, timeout is ignored
'timeout' : 6, // disappears after 6 seconds
'dismissable' : true // can be dismissed manually
});

// default settings (apply to all future notifications)
$.notify_osd.setup({
'visible_max' : 2, // max. no. of simultaneously-visible notifications
'icon' : 'images/default.png',
'sticky' : false,
'timeout' : 8
});

// the following notification will have the default settings above ...
var notif = $.notify_osd.create({
'text' : 'Hello!'
});

// ... unless they are specifically overriden
var notif = $.notify_osd.create({
'text' : 'Hey!',
'icon' : 'images/override.png'
'sticky' : true
});

// dismiss a single notification
notif.dismiss();

// dismiss ALL notifications (visible as well as queued)
$.notify_osd.dismiss();
```


Features
--------
* Can be easily plugged into [jQuery](http://jquery.com).
* Queueing of multiple notifications
* Multiple notifications with queueing
* Unobtrusive and minimalistic
- Transparency on hover
- Click _through_ notifications on links / buttons below them
- Notifications become transparent on hovering over them
- You can even click _through_ notifications on links / buttons below them!
* Simple API
* Theme-able and configurable
* Modifiable global defaults


Demo & Source Code
------------------

code: http://github.com/vickychijwani/jquery-notify-osd/ OR http://plugins.jquery.com/project/JNotifyOSD

demo: http://vickychijwani.github.com/jquery-notify-osd/


Usage
-----
Copy notify-osd.min.js and notify-osd.css to your project. The default theme can be changed by editing notify-osd.css. Minified versions (notify-osd.min.*) are also available. See examples below for how to use the plugin.
Copy notify-osd.min.js and notify-osd.css to your project. The default theme can be changed by editing notify-osd.css. Minified versions (notify-osd.min.*) are also available. See examples above for how to use the plugin.


Supported Browsers
Expand Down Expand Up @@ -71,46 +116,3 @@ The last three options should not usually be needed, but if your use-case calls

0. opacity_max and opacity_min (type: number in the range [0.0, 1.0], default: `0.85` and `0.20` respectively)
- The maximum and minimum opacities of the notification. When the mouse pointer is far from the notification, its opacity is opacity_max, as the mouse comes closer the opacity goes to opacity_min. The region around the notification in which this occurrs is defined by the `buffer` option.


Examples
--------
```js
// simplest example, default settings
var notif = $.notify_osd.create({ text: 'Hey there!' });

// standard options
var notif = $.notify_osd.create({
'text' : 'Hi!',
'icon' : 'images/icon.png', // icon path, 48x48
'sticky' : false, // if true, timeout is ignored
'timeout' : 6, // disappears after 6 seconds
'dismissable' : true // can be dismissed manually
});

// default settings (apply to all future notifications)
$.notify_osd.setup({
'visible_max' : 2, // max. no. of simultaneously-visible notifications
'icon' : 'images/default.png',
'sticky' : false,
'timeout' : 8
});

// the following notification will have the default settings above ...
var notif = $.notify_osd.create({
'text' : 'Hello!'
});

// ... unless they are specifically overriden
var notif = $.notify_osd.create({
'text' : 'Hey!',
'icon' : 'images/override.png'
'sticky' : true
});

// dismiss a single notification
notif.dismiss();

// dismiss ALL notifications (visible as well as queued)
$.notify_osd.dismiss();
```

0 comments on commit 00ed420

Please sign in to comment.