using exact same JS and HTML, the code below is triggered on Bootstrap4, but not v5.alpah2
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
//code
});
@xbaha There may be some other issue in your use case but the event is working here:
https://jsbin.com/qapalukufa/edit?js,console,output
Btw @rohit2sharma95 when we detect jQuery we trigger events with jQuery.
But it still works without jQuery: https://jsbin.com/sepodefuce/1/edit?js,console,output
Yes @Johann-S, I added the example with jQuery because the snippet in the first comment was using jQuery. :smile:
here is an example:
https://jsfiddle.net/60zmncxa/
it was not triggered
here is an example:
https://jsfiddle.net/60zmncxa/
Due to the order of the scripts, you need to put jquery before the bootstrap's script. 馃槃
Hi @xbaha,
It's written in our documentation here: https://v5.getbootstrap.com/docs/5.0/getting-started/introduction/#js
Place one of following