I have a lightbox in which I want to render a Rails partial, like so:
var data = "render :conversations => new";
$('#lightbox').append('#{escape_javascript(data)');
Unfortunately, this results in the text "render :conversations => new" appearing in the lightbox, rather than the actual rendering. I assume this is because I'm appending the partial rather than rendering it at runtime. I've followed the advice on this thread, but to little success. It recommends I add a "!=" in front of the append line like so:
!= "$('#lightbox').append('#{escape_javascript(data)');"
This throws a syntax error because of the "!=". Perhaps I'm using this symbol incorrectly, but I can't find any information about it on Google. How might I get this to work?