简体   繁体   中英

how do you install jquery in Ruby on Rails?

只是将javascript文件夹中的jquery.jq文件安装并链接到此即可吗?

What version of Rails are you running?

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 .

For Rails 3.0, you should download the jquery-ujs version of rails.js from github to achieve the same functionality.

Otherwise, you'll have to write all your AJAX manually if you just remove prototype and scriptaculous and drop in jquery.js .

是的,删除默认的js文件并放置您自己的文件,然后将其包含在布局中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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