1

I have a boostrap drop down menu on my nav bar. It is working fine on on all pages, except the home page. I believe it has to do with the application.js file, so does the order before or after jquery.ujs matter? How come the menu just won't drop down on the root/home page?

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require jquery.masonry.min.js
//= require_tree .
4

2 回答 2

1

Adding this code at the bottem of the application.js did the trick.

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

于 2013-09-23T13:12:20.813 回答
0

view the source of home page , and check the javascript files jquery.js and bootstrap.js loaded correctly. use firebug and check the js console

Here is a the screen short of google chrome console window.

google chrome console

the errors are shown in red color.

于 2013-09-23T13:09:56.997 回答