将jQuery更改为Prototype?

Im trying to use AJAX to update a partial on a page. I following tutorials online and realized one thing, the .js.erb file im using contains jQuery code, while my app is set up to use Prototype. Can the .js.erb file contain Prototype code, or only jQuery? Can this code be written in Prototype?

filter.js.erb:

$("#filter").update("<%= escape_javascript(render(:partial => "filter")).html_safe %>");

Any suggestions?

Depending on the version of Rails you have, you probably need the JS adapter (https://github.com/rails/jquery-ujs)

You can use jQuery code if you include the jquery.js in one of your templates, but to use the Rails specific javascript features, you'll need to setup the adapter.

As far as I know, it's an either/or proposition for Rails-UJS. Both jQuery & Prototype support "no-conflict" modes, but Rails cannot do unobtrusive javascript using both libraries at the same time.