Fade notifications on mouseover.
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 3 May 2010 23:19:17 +0000 (17:19 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 May 2010 05:10:08 +0000 (23:10 -0600)
Inspired by Ubuntu desktop notifications.

horde/js/Growler.js

index 9e85e05..107fba1 100644 (file)
             }
 
             this.growler.wrap(document.body);
+
+            this.growler.observe('mouseenter', function() {
+                this.growler.fade({
+                    duration: 0.25,
+                    queue: { limit: 2, scope: 'growler' },
+                    to: 0.3
+                });
+            }.bind(this));
+            this.growler.observe('mouseleave', function() {
+                this.growler.appear({
+                    duration: 0.25,
+                    queue: { limit: 2, scope: 'growler' },
+                    to: 1
+                });
+            }.bind(this));
         },
 
         growl: function(msg, options)