klaas4/jQuery.popover — pull request #14 by sumwierdkid (2013-02-25 18:33:31+00:00)
Title: Added triggers for init, destroy, show and hide.

This is a really cool plugin! I needed some basic event triggers, so I added them to your source. They call trigger("popover" + eventname), so anyone can just add $(selector).on("popover" + eventname, callback). For example, $("#popover").popover({ title: "My Title", content: "Thanks for clicking!", trigger: "click"}).on("popovershow", function() { alert("show!"); }); will alert "show" whenever the popover button is clicked.

I also added this functionality as options, so you can call $("#popover").popover({ title: "My Title", content: "Thanks for clicking!", trigger: "click", init: function() { alert("init!"); }, show: function() {alert("show!"); }}.

Hope you enjoyed the changes.