Works for tooltip:
var tmp = $.fn.tooltip.Constructor.prototype.show;
$.fn.tooltip.Constructor.prototype.show = function () {
tmp.call(this);
if (this.options.callback) {
this.options.callback();
}
}
this.$('#selector').tooltip({
placement: 'top',
callback: function() {
alert('hello')
}
});