Why is my dropdown menu with Bootstrap not working?

前端 未结 6 1078
野性不改
野性不改 2021-02-08 07:54

In my Rails application, I have the following code for a dropdown menu:

&l
6条回答
  •  粉色の甜心
    2021-02-08 08:18

    I tested your HTML code and it worked fine.

    First of all, make sure you are loading jQuery first:

    //= require jquery
    //= require bootstrap
    

    Also, you have to call the dropdown via javascript:

    $('.dropdown-toggle').dropdown()  
    

提交回复
热议问题