我将此添加到我的Gemfile:与jQuery的平滑滚动导轨遇到问题
group :assets do
gem 'jquery-smooth-scroll-rails', :git => '[email protected]:gretel/jquery-smooth-scroll-rails.git'
end
然后我跑bundle install
并列入我application.js
如下:
//= require jquery-smooth-scroll
这是怎么我打电话在我custom.js
文件:
$('a.scroll-to-form').smoothScroll();
这是referencin g由此标签创建的元素:
<%= link_to "See your options", "#bottom-form", :class=>"white-btn scroll-to-form" %>
但是效果没有呈现。