Twitter Bootstrap drop down menu not working

后端 未结 8 1807
遇见更好的自我
遇见更好的自我 2021-02-08 03:33

I know there are a lot of questions like this on Stack Overflow and I\'ve looked at them but my dropdown menu still isn\'t working.

Here\'s my code:



        
8条回答
  •  Happy的楠姐
    2021-02-08 04:13

    In my case the problem was with version of jQuery. In bootstrap.js v3.3.6

    if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
        throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
      }
    

    Note: 'Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3'

    I replaced the code of local jQuery file with jQuery-1.11.3.js and it starts working.

    Hope it will work for you as well.

提交回复
热议问题