Skip to content

Commit

Permalink
fix bug: require scrollTo js file in application.js to avoid js isnt …
Browse files Browse the repository at this point in the history
…precompile
  • Loading branch information
ilstar committed Mar 22, 2012
1 parent c5265f3 commit ff8dd43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Expand Up @@ -13,4 +13,4 @@
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap

//= require jquery.scrollTo-min
6 changes: 1 addition & 5 deletions app/views/orders/_form.html.erb
Expand Up @@ -32,13 +32,9 @@
</div>
<% end %>

<%= content_for :head do %>
<%= javascript_include_tag 'jquery.scrollTo-min' %>
<% end %>

<ul class="nav nav-tabs nav-stacked" style="position:fixed;top: 200px; left: 0px;">
<% MealTime.today.vendors.each do |vendor| %>
<!--li><%= link_to vendor.name, "##{dom_id(vendor)}" %></li-->
<li><%= link_to vendor.name, "javascript:$('body').scrollTo($('##{dom_id(vendor)}').offset().top - 41, 0, {queue: true})" %></li>
<li><%= link_to vendor.name, "javascript:$('body').scrollTo($('##{dom_id(vendor)}').offset().top - 41, 0, {duration: 250})" %></li>
<% end %>
</ul>

0 comments on commit ff8dd43

Please sign in to comment.