Skip to content

Commit

Permalink
Merge pull request #54 from timotheeg/master
Browse files Browse the repository at this point in the history
Fix inconsistent click handler args + update docs
  • Loading branch information
stanlemon committed Apr 27, 2016
2 parents c42efee + fc8fcbe commit 1503ac5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ $.jGrowl("A message with a beforeOpen callback and a different opening animation
| closer | true | Whether or not the close-all button should be used when more then one notification appears on the screen. Optionally this property can be set to a function which will be used as a callback when the close all button is clicked. This must be changed in the defaults before the startup method is called. |
| closeTemplate | × | This content is used for the individual notification close links that are added to the corner of a notification. This must be changed in the defaults before the startup method is called. |
| closerTemplate | <div>[ close all ]</div> | This content is used for the close-all link that is added to the bottom of a jGrowl container when it contains more than one notification. This must be changed in the defaults before the startup method is called. |
| log | function(e,m,o) {} | Callback to be used before anything is done with the notification. This is intended to be used if the user would like to have some type of logging mechanism for all notifications passed to jGrowl. This callback receives the notification's DOM context, the notifications message and its option object. |
| beforeOpen | function(e,m,o) {} | Callback to be used before a new notification is opened. This callback receives the notification's DOM context, the notifications message and its option object. |
| afterOpen | function(e,m,o) {} | Callback to be used after a new notification is opened. This callback receives the notification's DOM context, the notifications message and its option object. |
| log | function(e,m,o) {} | Callback to be used before anything is done with the notification. This is intended to be used if the user would like to have some type of logging mechanism for all notifications passed to jGrowl. This callback receives the notification's DOM context, the notification's message and its option object. |
| beforeOpen | function(e,m,o) {} | Callback to be used before a new notification is opened. This callback receives the notification's DOM context, the notification's message and its option object. |
| afterOpen | function(e,m,o) {} | Callback to be used after a new notification is opened. This callback receives the notification's DOM context, the notification's message and its option object. |
| open | function(e,m,o) {} | Callback to be used when a new notification is opened. This callback receives the notification's DOM context, the notifications message and its option object. |
| beforeClose | function(e,m,o) {} | Callback to be used before a new notification is closed. This callback receives the notification's DOM context, the notifications message and its option object. |
| close | function(e,m,o) {} | Callback to be used when a new notification is closed. This callback receives the notification's DOM context, the notifications message and its option object. |
| beforeClose | function(e,m,o) {} | Callback to be used before a new notification is closed. This callback receives the notification's DOM context, the notification's message and its option object. |
| close | function(e,m,o) {} | Callback to be used when a new notification is closed. This callback receives the notification's DOM context, the notification's message and its option object. |
| click | function(e,m,o) {} | Callback to be used when a notification is clicked. This callback receives the notification's DOM context, the notification's message and its option object. |
| animateOpen | { opacity: 'show' } | The animation properties to use when opening a new notification (default to fadeOut). |
| animateClose | { opacity: 'hide' } | The animation properties to use when closing a new notification (defaults to fadeIn). |
2 changes: 1 addition & 1 deletion jquery.jgrowl.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
}).bind('jGrowl.afterOpen', function() {
o.afterOpen.apply( notification , [notification,message,o,self.element] );
}).bind('click', function() {
o.click.apply( notification, [notification.message,o,self.element] );
o.click.apply( notification, [notification,message,o,self.element] );
}).bind('jGrowl.beforeClose', function() {
if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) !== false )
$(this).trigger('jGrowl.close');
Expand Down

0 comments on commit 1503ac5

Please sign in to comment.