Srirangan/notifer.js — pull request #4 by jamespadolsey (2011-11-05 07:55:54+00:00)
Title: Clean up code - multiple improvements - please review

Hi,

I made some improvements:

* `$` is no longer assumed to be available, as is the case sometimes, so it takes `jQuery` (global) and assigns it to a local `$` instead. (this is a common jQ plugin pattern)
* No longer uses `escapeHtml` -- much easier to use a text node instead.
* Passes an object with all properties to `.css()` instead of assigning individually.
* No need for quoted property names in `notificationStyles` object -- the names can camelCased and then taken out of quotes -- works like a charm.
* There is no need to define IE's opacity -- jQuery takes care of `-ms-filter/filter` etc.
* Notification elements are removed from the DOM after fading-out.
* Wrapped an IIFE (Immediately invoked function expression) around the code to ensure no globals other than those we specify -- `NotifierjsConfig` and `Notifier`.

I saw it on reddit and wanted to help a little bit. No need to accept this pull request...

If you have any questions let me know :)

Nice work.

-james.