Bootstrap导航栏崩溃不像以前那样工作

时间:2016-06-29 13:14:35

标签: jquery html navbar collapse

我的基于bootstrap的折叠导航栏工作正常。然后我对页面进行了一些更改(在另一个代码区域),突然间它无法正常工作。相关代码对我来说就像通过工作示例一样。

老一:

        <!--NAV-->
        <div class="navbar-header">
            <a href="index.html" class="navbar-brand">chcemelepšísvět</a>
            <!--RESPONSIVE BTN-->
            <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle nav</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
            <!--NAV-->
            <ul class="nav navbar-nav list-unstyled list-inline collapse navbar-collapse">
                <li><a href="" class="transitioned" >PROJEKTY</a></li>
                <li><a href="" class="transitioned" >JAK ZAČÍT</a></li>
                <li><a href="" class="transitioned" >NĚCO O NÁS</a></li>
                <li><a href="" class="transitioned hidden-sm" >LOGIN</a></li>
            </ul>

        <!--LOGIN-->
        <div class="login vertical-center-sl hidden-xs">
            <i class="glyphicon glyphicon-search"></i>
            <a class="transitioned">PŘIHLÁSIT</a>
        </div>

新的(不工作的):

        <!--NAV-->
        <div class="navbar-header">
            <a href="index.html" class="navbar-brand">Chcemelepšísvet</a>

            <!--RESPONSIVE BTN-->
            <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle nav</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>       
        </div>

        <!--NAV-->
        <ul class="nav navbar-nav list-unstyled list-inline collapse navbar-collapse">
            <li><a href="" class="transitioned" >PROJEKTY</a></li>
            <li><a href="" class="transitioned" >JAK ZAČÍT</a></li>
            <li><a href="" class="transitioned" >NĚCO O NÁS</a></li>
            <li><a href="" class="transitioned hidden visible-xs">VYHLEDAT</a></li>
            <li><a href="" class="transitioned hidden visible-xs">PŘIHLÁSIT SE</a></li>
        </ul>

        <!--LOGIN-->
        <div class="login vertical-center-sl hidden-xs">
            <i class="glyphicon glyphicon-search"></i>
            <a class="transitioned">PŘIHLÁSIT</a>
        </div>

他们最后都有这个:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>

任何可能导致问题的想法?

0 个答案:

没有答案