且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery在Rails 3.2.8上不起作用

更新时间:2023-12-04 23:20:46

已修复!

在application.html.erb中,我从以下位置更改了这两行的顺序:

in application.html.erb, I changed the ordering of these two lines from:

<%= stylesheet_link_tag    "application", :media => "all" %>
<%= javascript_include_tag "application" %>

收件人:

<%= javascript_include_tag "application" %>
<%= stylesheet_link_tag    "application", :media => "all" %>

现在可以使用了!我不太确定为什么会有人解释?

Now it works! I'm not quite sure why though, can anybody explain?