2017-08-13 69 views
-1

我不是java脚本开发人员,但我使用java脚本在这里和那里原谅如果我的问题是显而易见的。jquery已停止加载

我的下拉菜单停止工作,我相信它有引导做不加载的jQuery我的文件,我得到任何more.Errors:

> 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

它看起来像没有找到该文件。如果文件仍然存在,你可以检查目录吗? –

+0

@Praveen你在说什么文件bootstrap它自己?我从这里加载它https://getbootstrap.com/dist/js/bootstrap.min.js –

+0

鲍里斯,你添加了jQuery吗?你**需要**单独包含jQuery。这只是jQueryUI.css。别担心。 –

回答

1

我假设你正在离线工作(没有服务器),并且我看到从你的CDNs //code缺失的协议应该更改为https://code

使用的Bootstrap CDN版本已更新。需要恢复到版本3.x

+0

不,它不会改变任何东西。 –

+0

尝试删除以'{{STATIC_URL}}'为src的'