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

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -