我想在手机和平板电脑上只有一个下拉菜单,但是当我点击菜单按钮时,它似乎无法正常工作。
navbar.html.erb:
<div class="ui inverted right menu mobile only tablet only grid">
<div class="ui dropdown icon teal item">
<i class="align big justify icon"></i>
<div class="menu">
<div class="item">
Profile
</div>
<div class="item">
Friends
</div>
<div class="item">
Log out
</div>
<div class="ui fluid search item">
<div class="ui icon input">
<input class="prompt" type="text" placeholder="Search friends...">
<i class="search icon"></i>
</div>
<div class="results">
</div>
</div>
</div>
</div>
</div>
navbar.js:
$('.dropdown').dropdown();
的application.js:
//= require jquery
//= require jquery_ujs
//= require semantic-ui
//= require semantic-ui/modal
//= require semantic-ui/dropdown
//= require semantic-ui/tab
//= require_tree .