Bootstrap: Nav shown.bs.tab is not getting triggered (v5 alpha2)

Created on 1 Nov 2020  路  6Comments  路  Source: twbs/bootstrap

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
});

awaiting-reply js v5

All 6 comments

@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

Related issues

ziyi2 picture ziyi2  路  3Comments

vinorodrigues picture vinorodrigues  路  3Comments

kamov picture kamov  路  3Comments

ghost picture ghost  路  3Comments

bellwood picture bellwood  路  3Comments