how do you install jquery in Ruby on Rails?
Is it just a matter of insta开发者_StackOverflowlling the jquery.jq file in the javascript folder and linking to it?
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
.
Yes, delete the default js files and place your own and then include it in your layouts.
精彩评论