# Trying to bind an appended partial that has REST\_in\_place attached to it with jquery?

**URL:** <https://www.ruby-forum.com/t/trying-to-bind-an-appended-partial-that-has-rest-in-place-attached-to-it-with-jquery/164280>\
**Category:** Rails\
**Created:** [March 30, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/trying-to-bind-an-appended-partial-that-has-rest-in-place-attached-to-it-with-jquery/164280 "2009-03-30T21:44:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tripdragon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tripdragon](https://www.ruby-forum.com/u/tripdragon)\
**Post date:** [March 30, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/trying-to-bind-an-appended-partial-that-has-rest-in-place-attached-to-it-with-jquery/164280/1 "2009-03-30T21:44:11Z")

</div>

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(’

\<%= escape\_javascript  
(flash.delete(:notice)) %\>
’);  
$("#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.
