Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ad a setting to implement onClick per notification #35

Closed
wants to merge 1 commit into from

Conversation

edofic
Copy link
Contributor

@edofic edofic commented Aug 11, 2014

This allows custom onClick callbacks to be defined per notifciation.

See examples/jgrowl.html for usage example. Behavior of notifications that don't set this setting does not change.

@stanlemon
Copy link
Owner

@edofic Can you PR this against the develop branch? Also, can you rename onClick to click to be more consistent with the other callback names?

Thanks for your contribution!

@@ -279,6 +281,8 @@
}
}).bind('jGrowl.afterOpen', function() {
o.afterOpen.apply( notification , [notification,message,o,self.element] );
}).bind('click', function() {
o.onClick();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use apply as well, so something like:
o.click.apply( notification , [notification,message,o,self.element] );

@edofic
Copy link
Contributor Author

edofic commented Aug 14, 2014

closed in favor of #36 since i cannot change target branch on an open pull request

@edofic edofic closed this Aug 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants