Bootstrap - dropdown menu not working?

后端 未结 11 1801
一向
一向 2020-12-24 00:43

My dropdown menu in Bootstrap doesnt appear to be working - can anyone alert me to the problem? Right now it displays the dropdown, but clicking it does nothing. Thanks!

相关标签:
11条回答
  • 2020-12-24 01:32

    putting

    <script src="js/bootstrap.min.js"></script>    
    

    file at the last after the

    <script src="jq/jquery-2.1.1.min.js"></script>  solved this problem for me .
    

    this is how i use write it now and no problem

    <script src="jq/jquery-2.1.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    
    0 讨论(0)
  • 2020-12-24 01:33

    put following code in your page

      Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
        function EndRequest(sender, args) {
            if (args.get_error() == undefined) {
            $('.dropdown-toggle').dropdown();
            }
        }
    
    0 讨论(0)
  • 2020-12-24 01:36

    When i checked i saw display: none; value is in the .dropdown-menu bootstrap css class. Hence i removed it.

    0 讨论(0)
  • 2020-12-24 01:42

    I had to download the source files instead of just the compressed files that it says to use for quick start on the bootstrap website

    0 讨论(0)
  • 2020-12-24 01:44

    Check if you're referencing jquery.js BEFORE bootstrap.js and bootstrap.js is loaded only once. That fixed the same error for me:

    <script type="text/javascript" src="js/jquery-1.8.0.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    
    0 讨论(0)
提交回复
热议问题