[jQuery] RAiLS + jQuery - trying to get rid of Prototype...

[jQuery] RAiLS + jQuery - trying to get rid of Prototype...


I am trying to get rid of Prototype and use only jQuery... , made some
progress but I am stuck now to what I use to do :
I sent an Ajax request ( read the doc.. ok; I got it)
"$.ajax({ url: '#{url}', async: true, type: 'GET', dataType:
'script'});"
I land correctly at the url (show action)
def show
@library = Library.find(params[:id])
respond_to do |format|
format.html
format.js { }
format.xml { render :xml => @library }
end
end
the request.xhr? => true
I checked (debugger comand) that the format.js block is executed ...
Ok
but now I don't catch how to write the partial 'update'...
I used to write the 'standard'
render :update do |page|
page.replace_html 'library_content', :partial => 'libraries/
content'
page.show 'library_content'
end
what should I write with jQuery ?
should I place the jQuery code in a show.js.erb file ?