我不是java脚本开发人员,但我在这里使用java脚本,如果我的问题很明显,请原谅。
我的下拉菜单停止工作我相信它必须为bootstrap做不再加载我的jquery文件。我得到的错误:
> jquery-ui.css Failed to load resource: the server responded with a
> status of 404 (NOT FOUND) bootstrap.min.js:6 Uncaught
> Error: Bootstrap dropdown require Popper.js (https://popper.js.org)
> at bootstrap.min.js:6
> at bootstrap.min.js:6
> at bootstrap.min.js:6 jquery-ui.css Failed to load resource: the server responded with a status of 404 (NOT FOUND)
所以我加载的文件
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="{{ STATIC_URL }}/static/jquery/jquery-1.9.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="{{ STATIC_URL }}/static/jquery/jquery-ui.js"></script>
<script src="https://getbootstrap.com/dist/js/bootstrap.min.js"></script>
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
<script src="https://getbootstrap.com/assets/js/vendor/holder.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="https://getbootstrap.com/assets/js/ie10-viewport-bug-workaround.js"></script>
<!-- toggle visibility for filter -->
<script type="text/javascript">
$(document).ready(function() {
$("#extra-content").hide();
$("#toggle-content").click(function(){
$("#extra-content").toggle();
});
});
</script>
<!-- ADDING DATEPICKER FUNCTIONALITY TO ALL DATES FIELDS -->
<script type="text/javascript">
$(document).ready(function() {
$('.datetimeinput').datepicker({ format: "yyyy/mm/dd" });
});
</script>
<!-- HIDE DISPLAY TREE BRACH WHEN CLICKED ON HEAD ITEM -->
<script>
$(document).ready(function () {
$('label.tree-toggler').click(function () {
$(this).parent().children('ul.tree').toggle(300);
});
});
</script>
<!-- I DONT REMEBER WHAT IT IS AND IF IS STILL REQUIRED FIX -->
<script type="text/javascript">
$(document).ready(function(){
$(".close").click(function(){
$(".alert").alert();
});
});
</script>
<!-- WAS FOR MAIN NAV MENU SHOULD BE OR FIXED OR REPLACED WITH DJANGO TEMPLATE SELECTION FIX -->
<script type="text/javascript">
$('.nav.navbar-nav > li').on('click', function (e) {
$('.nav.navbar-nav > li').removeClass('active');
$(this).addClass('active');
});
</script>
可能是什么问题。这个设置在很长一段时间之前对我有用,但刚刚停止。
答案 0 :(得分:1)
我假设您正在脱机工作(没有服务器),我发现您的CDN //code
中缺少的协议应更改为https://code
。
使用的Bootstrap CDN有更新版本。需要恢复到版本3.x