Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vue Directive on show-bs-tab
Vue.directive('on-show-bs-tab', {
bind: function (el, binding) {
// This is BS4 jQuery
// When the tab is activated, load the data!
$(el).on('show.bs.tab', function (e) {
if (typeof binding.value === "function") {
binding.value.call();
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment