I am trying to reload a DIV that has the following in it from before.
<div id="mydiv">{% include "comments/comments.html" %}</div>
What I want to do is this when I click a button;
$('#mydiv').html('{% include "comments/comments.html" %}</div>
But putting the django tag inside the jquery html function makes javascript very unhappy. I know that this can be solved with .load() but that would mean I would have to rewrite my entire logic which would break other stuff.
includestatements will happen before. So this approach will not work. If you don't want to use$.load()you couldincludeinto a hidden element, then use jQuery to.show(). I'd use.load().