Bootstrap shown.bs.tab event not working

后端 未结 5 903
臣服心动
臣服心动 2021-02-06 04:42

I\'m using the Flexy template (using bootstrap) and I can\'t get the shown.bs.tab event on tab to work.

I\'ve managed to make it work on JSFiddle.

Here is the co

5条回答
  •  没有蜡笔的小新
    2021-02-06 05:25

    In my case, there was a conflict between Jquery and Bootstrap.

    I solved the problem with jQuery.noConflict(). See below!

    I hope that helps!

    // Issue @ tabs toggle 
    jQuery.noConflict();
    $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) {
        alert(e.target.href);
    });
    

提交回复
热议问题