On Mon, Mar 2, 2009 at 11:31 PM, Difei Z.
I think many fellow rails developers are using jquery extensively now
and some one may already solved my problem:
rails’ RJS facility has helper methods like “replace_html”, they
allowed you to render partials in the .rjs file and execute the
Thanks in advance!
I have this in my application.html.erb
I have this in my application.js:
var $j = jQuery.noConflict();
This puts the jQuery instance into it’s own namespace, leaving the $
object from prototype alone.
And then in an rjs template I can do things like:
page.replace_html ‘pane_content’, :partial => ‘message/sent_pane’
page << “$j($j.fn.nyroModal.settings.openSelector).nyroModal();”