简体   繁体   English

Ruby on Rails 3 javascript_include_tag

[英]Ruby on Rails 3 javascript_include_tag

When I have this as my javascript_include_tag in the head section application.html.erb : 当我在标题application.html.erb将此作为我的javascript_include_tag时:

<%= javascript_include_tag :defaults %>

I can successfully use disable_with on submit_tag , but when I change it to: 我可以在submit_tag上成功使用disable_with ,但是当我将其更改为:

<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"%>
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js" %>
<%= javascript_include_tag "application" %>

..in order to use a jQuery calendar I cannot use disable_with anymore. ..为了使用jQuery日历,我不能再使用disable_with了。 It doesn't work anymore. 它不再起作用了。

Any ideas? 有任何想法吗?

您缺少rails.js,也将其添加到了include中

<%= javascript_include_tag "rails" %>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM