I am using Bootstrap-select in my project. Is it possible to add a callback when Select has been opened? Code below does not work.
var sp = $.fn.selectpicker.constructor.prototype.show;
$.fn.selectpicker.constructor.prototype.show = function () {
sp.call(this);
if (this.options.callback) {
//console.log('is callback!');
this.options.callback();
}
};
$('.selectpicker-state').selectpicker({
title: null,
callback: function() {
alert('show!');
}
});