jquery - How to load a html file's content into javascript variable in django? -


i'd insert contents of abc.html after div when event fires.

i tried

var content = {% include "path/to/abc.html" %};  $(".mydiv").click(function() {  $("#anotherdiv").insertafter(content); }); 

however, seems `{% include %} fails because of sort of parsing error. (abc.html multi-line)

abc.html contains django filters/tags.

any thoughts?

one alternative approach put contents hidden div, , click function unhide it.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -