[jQuery] Loading a DOM Element with Rails Template Syntax?

[jQuery] Loading a DOM Element with Rails Template Syntax?


Hi,
I've got a template that is loaded into the page, and immediately
hidden by jQuery. I want to duplicate it and append it into another
place on the page. The situation is that there are spots in the HTML
fragment that have the Rails template syntax: <% something.each do |
item| %>. What I'd like to do is replace "text" with something else.
The problem is that jQuery doesn't seem to "know" about these tags as
I can't find them using text() or html(). I've tried serializing the
element to html() and doing a replace: el.html().replace('<%', '') but
nothing changes. I think it must have something to do with html
encoding or something? Because after I append it to the page, the
Rails tags are still there? So, I guess to be concise, the question is
how do I find and manipulate those Rails template tags using jQuery?
Thanks!