tripdragon
2009-Mar-30 19:43 UTC
Trying to bind an appended partial that has REST_in_place attached to it with jquery?
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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
