[英]how do you install jquery in Ruby on Rails?
只是将javascript文件夹中的jquery.jq文件安装并链接到此即可吗?
What version of Rails are you running? 您正在运行哪个版本的Rails?
For Rails 2.x, you will probably also want to install the jrails
plugin to provide jquery versions of all the javascript helpers like link_to_remote
and periodically_call_remote
. 对于Rails 2.x,您可能还需要安装
jrails
插件以提供所有javascript帮助器的jquery版本,例如link_to_remote
和periodically_call_remote
。
For Rails 3.0, you should download the jquery-ujs
version of rails.js
from github to achieve the same functionality. 对于Rails 3.0,您应该从github下载
rails.js
的jquery-ujs
版本以实现相同的功能。
Otherwise, you'll have to write all your AJAX manually if you just remove prototype
and scriptaculous
and drop in jquery.js
. 否则,如果您仅删除
prototype
和scriptaculous
并放入jquery.js
则必须手动编写所有AJAX。
是的,删除默认的js文件并放置您自己的文件,然后将其包含在布局中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.