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

Popular posts from this blog

How to get the arclen between two curve points in Maya? -

C++ Linked List -

git svn - Unignore directories in git-svn (adding directories to a sparse checkout) -