jquery-stickytabs icon indicating copy to clipboard operation
jquery-stickytabs copied to clipboard

shown.bs.tab not fired?

Open fmonts opened this issue 3 years ago • 1 comments

I need to do something when the tab is changed, shouldn't shown.bs.tab be fired?

You can try

$('.nav-tabs').on('shown.bs.tab', function (event) {
    let tabTarget = $(event.target).attr('href');
    console.log($activeTab.val());
}).stickyTabs();

and you'll see the tab name logged only on manual change, not on the initial change by stickyTabs

fmonts avatar Jun 23 '21 07:06 fmonts

I solved by adding .trigger('shown.bs.tab') after $(selector, context).tab('show')

fmonts avatar Jun 23 '21 07:06 fmonts