if($("#reply_message_<%= @message.id%>").length > 0) { $("#reply_message_<%= @message.id%>").replaceWith("<%= escape_javascript(render :partial => 'reply_message', :locals => {:reply => @message}) %>"); $(function(){ /*$('#reply_subject').val("<%#= raw escape_javascript(@subject) %>"); $('#quote_quote').val("<%#= raw escape_javascript(@temp.content.html_safe) %>");*/ sd_create_editor_from_data(<%= @message.id%>,null,"100%", "<%=@message.class.to_s%>"); }); }else if($("#reply_to_message_<%= @message.id%>").length >0) { $("#reply_to_message_<%= @message.id%>").replaceWith("

"); }