Forum: Ruby on Rails Trying to bind an appended partial that has REST_in_place attached to it with jquery?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B4e37f0a961cef360290869d5ef2b5bf?d=identicon&s=25 Trip Dragon (tripdragon)
on 2009-03-30 21:44
(Received via mailing list)
In my create.js.erb view I am creating a new model in the view. On
creation I want to have the appended partial in the dom and
selectable
so I can click it's name and run the plugin REST in place with
Jquery.

#create.js.erb

$("#new_show").before('<div id="flash_notice"><%= escape_javascript
(flash.delete(:notice)) %></div>');
$("#shows").append("<%= escape_javascript(render(:partial => @show))
%>").effect("highlight", {}, 3000);

$(".rest_in_place").livequery('click', function(){rest_in_place()});
$("#new_show")[0].reset();

The portion below so far does nothing. Just my tests to see what I can
try and bind.
$(".rest_in_place").livequery('click', function(){rest_in_place()});

It would be nice if there was a simple bindEverything(); if I am
mistaken in this entire approach please tell me so.

Thank you.
This topic is locked and can not be replied to.