longlostnick / bootstrap-growl

Pretty simple jQuery plugin that turns standard Bootstrap alerts into "Growl-like" notifications.
http://ifightcrime.github.io/bootstrap-growl
MIT License
806 stars 207 forks source link

Add click callback option #27

Closed hiromitz closed 10 years ago

hiromitz commented 11 years ago

I added callback option when notification is clicked.

This option is actually that I needed for my project.

thanks.

longlostnick commented 10 years ago

The $.bootstrapGrowl function returns the jQuery element. You should just be able to do something like this:

$el = $.bootstrapGrowl('hi');
$el.click(function(e) {
  console.log('clicked!');
});
hiromitz commented 10 years ago

oh, I see. thanks.