jquery - How to render patial through replaceWith() -
i have looked @ similar question , answers didn't work , may dated. think there used thing called rjs but, trying remove 1 partial , replace another.
$("#me") .replacewith( '<%= escape_javascript render(partial: "photospread") %>')
what happens sent browser text , displays <%= escape_javascript render(partial: "photospread") %>
replace <%
<%=
$("#me").replacewith('<%= escape_javascript render("photospread") %>')
<%
evaluate ruby code inside it
whereas
<%=
evaluate , print code inside<%= %>
Comments
Post a Comment