Permalink
Browse files

add "close" event

  • Loading branch information...
1 parent f5046b6 commit 475a69f83dd0cd31eb36daa4dfe61a8e8c637971 @tj tj committed Aug 30, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −0 Readme.md
  2. +1 −1 component.json
  3. +1 −0 index.js
View
@@ -27,6 +27,7 @@ $ npm install notification-component
## Events
+ - `close` the notification is closed via the X
- `click` the notification is clicked
## API
View
@@ -1,7 +1,7 @@
{
"name": "notification",
"description": "Notification component",
- "version": "0.0.2",
+ "version": "0.0.3",
"keywords": ["notify", "notification", "ui", "growl"],
"dependencies": {
"component/emitter": "*",
View
@@ -117,6 +117,7 @@ Notification.prototype.render = function(options){
, self = this;
el.find('.close').click(function(){
+ self.emit('close');
self.hide();
return false;
});

0 comments on commit 475a69f

Please sign in to comment.