【发布时间】:2017-06-14 10:52:16
【问题描述】:
我想在我的网站中使用引导导航栏,所以我制作了网页 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 g/https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29946 g/https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262
【问题讨论】:
标签: javascript jquery html twitter-bootstrap