bootstrap 3 tabs not working properly

后端 未结 14 2644
情深已故
情深已故 2020-12-24 05:58

I almost copied the code from their website. The tab is initiated perfectly, and when I click on tabs, new panels are activated. However, the \"active\" class is not applied

14条回答
  •  旧时难觅i
    2020-12-24 06:42

    According to the Docs you need to put an id on each link in the header and that link needs to be inside the li which should have no other styles, i.e doesn't need all the data-target stuff in the li. Your list has with no data-toggle or id.

    Your HTML would be like this

    
    
    
    
    
    
    AAA
    BBB
    CCC
    DDD

    And you shouldn't need any Javascript, according to the Docs

提交回复
热议问题