我有下面的代码,但下拉菜单不起作用,有什么想法吗?我是否需要添加“$('.dropdown-toggle').dropdown();” 到我的 javascript 文件?
.navbar.navbar-fixed-top
.navbar-inner
.container
%button.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse", :type => "button"}
%span.icon-bar
%span.icon-bar
%span.icon-bar
= link_to I18n.t(:site_title), root_url, :class => "brand"
.nav-collapse
%ul.nav
%li= link_to I18n.t(:nav_thelist)
%li= link_to I18n.t(:nav_themap)
%li= link_to I18n.t(:nav_the92)
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", "data-target" => "#", :href => "#"}
= I18n.t(:nav_admin)
%b.caret
%ul.dropdown-menu
%li= link_to I18n.t(:nav_leagues), leagues_url
%li= link_to I18n.t(:nav_clubs), clubs_url
%li= link_to I18n.t(:nav_visits), visits_url