hakanersu / AmaranJS

Nice, sleek and stylish notifications.
http://amaranjs.com/
MIT License
213 stars 59 forks source link

added callback functionality #1

Closed cybermill closed 10 years ago

cybermill commented 10 years ago

I needed to call a specific function to your notification plugin so I added this code to createElements

            if (this.config.clickfunct){
                var bu = this;
                $(element).on('click',function(){
                    bu.config.clickfunct();
                });
            }

then pass the function in with the options

apprve_opts.clickfunct = function(){ window.location = "/memberusers/useradmin"; };
$.amaran(apprve_opts);

be nice if this was or something like it was added to the next release.

Thanks for all you do. Jeff

hakanersu commented 10 years ago

Thank you for your suggestion.I'll add more events.

hakanersu commented 10 years ago

Thank you @cybermill this feature added in new version.