Bootstrap导航栏下拉列表不会切换

时间:2017-06-14 10:52:16

标签: javascript jquery html twitter-bootstrap

我想在我的网站上使用bootstrap导航栏,所以我已经制作了网页header.html(下面给出的链接),它工作正常

http://upscfever.com/upsc-fever/header.html

然而,当我在我的主页上使用相同的代码时(链接如下)。我们打开它之后它就不会关闭。

http://upscfever.com/upsc-fever/index.html

在我的主页 - index.html上,我写了下面的代码。

        <script>
            $(function () {
                $("#header").load("http://upscfever.com/upsc-fever/header.html");
               });
        </script>

<body>
<div id="header"></div>
<!-- other things-->
</body>

我收到错误:

  

jQuery.Deferred异常:$(...)。dropdown不是一个函数   @ http://upscfever.com/upsc-fever/index.html:1:15   克/ HTTPS://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29946   克/ HTTPS://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262

2 个答案:

答案 0 :(得分:0)

您可能希望将load脚本放在body标记的末尾,以便<div id="header">在使用之前添加到DOM中。 还要确保您没有在index.html文件中多次加载bootstrap js。

答案 1 :(得分:0)

也许尝试

=IF(A1="John", SUMPRODUCT(--(ISNUMBER(B1:E1)),B1:E1), "")

看看它是否可以工作。

相关问题