Anchor links in bootstrap don't work

2019-09-22 01:26发布

I am using bootstrap 3.2.0. I have some content in the tabs and I want to create an anchor link to this content in the tabs to different websites. Here is my code:

        <div class="bs-docs-example">
         <div class="tabbable tabs-left">
            <ul class="nav nav-tabs">

                <li><a href="#1A" data-toggle="tab"> Sample#1 </h1></a></li>
                <li><a href="#2A" data-toggle="tab"> Sample#2 </h1></a></li>
             </ul>
            <div class="tab-content">

                <div class="tab-pane" id="1A">

                    <li id="ndf_35"></li>

                </div>
                <div class="tab-pane" id="2A">

                    <li id="ndf_36"></li>


                </div>



            </div>
        </div>
    </div>

I create the link like this :

    <a href="http://www.example.com/page1#ndf_36">some text </a>

But it's not working. Does anyone have an idea how to fix this?

1条回答
ら.Afraid
2楼-- · 2019-09-22 02:17

Demo

Its working fine.

Check that

  • You have included jquery (you need jquery for bootstrap.js)
  • You have included bootstrap.js
  • open <h1> tags
查看更多
登录 后发表回答