I have a piece of jQuery code that fills an element on the page with some content:
var content = $("#note_"+note.id).html();
$("another_div").html(content);
This replaces the html of the other div fine, but the problem is that any data-remote attributes no longer function on any content inside "another_div". I think the problem is that jquery_ujs is working great for the items on the page at pageload, but if I remotely load content, I lose that functionality.
How do I work around this? I am interested in this as well for its ramifications of remotely loaded partials