Externally Linking to a Tab, Tab not changing, Bootstrap 3.3.5

后端 未结 3 714
南方客
南方客 2021-01-15 21:45

My issue is very similar to these questions, where I am trying to use a link to change tabs, but the link only changes the tab content, but not the active tab.

Most

3条回答
  •  有刺的猬
    2021-01-15 21:49

    You are including your script file before you import jQuery and the bootstrap javascript files.

    Since your code requires both of these libraries, you need to move your script2.js underneath your other scripts:

    
    
    
    

    Your browsers javascript console will contain a message along the lines of:

    $ is not defined.

    this should always be the first place you look.

    Your code works fine when used correctly: http://www.bootply.com/zP1y6wJIl1

提交回复
热议问题