title: How to load jquery before all other javascript with master template
body: <p>I am using a master template which roughly looks like this </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          // load css files
      &lt;/head&gt;
      &lt;body&gt; 
          {% block body %}{% endblock %}
          // load js files including jquery 
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now all other sites for my app look like this </p>
  
  <pre><code>{% extends "master.html" %}
  
  {% block body %}  
      // site content
  {% endblock %}
  </code></pre>
  
  <p>for each site I have some specific <code>javascript</code> code, which I put at the end of the body block. But this means that this <code>javascript</code> is loaded before <code>jquery</code> is loaded (which is done in the master template). Since some of the <code>javascript</code> in the body tag requires <code>jquery</code> (like e.g. the <code>$(document).read() function)</code> I get errors. The simple solution is to include <code>jquery</code> in each body tag separately... however, that starts to undermine the point of the master template... is there any better solution?
  thanks 
  carl</p>
  
  <p>EDIT: Sorry I forgot to say that my current solution is to load jquery before the body, however, google pagespeed complains about this so I was looking for a better solution</p>