title: Using jquery to load a page in a div upon document.ready with flask framework
body: <p>I have the following in the <code>&lt;script&gt;</code> section of my <code>main.html</code>.</p>
  
  <pre class="lang-javascript prettyprint-override"><code>$(document).ready( function() {
      $.get("/welcome/", function(res) {
          $("#welcome").html(res);
      });
  });
  </code></pre>
  
  <p>In the body of this <code>main.html</code>, I have</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="welcome"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>In my flask main python program, I have</p>
  
  <pre class="lang-python prettyprint-override"><code>@app.route('/welcome/')
  def welcome():
      return render_template('welcome.html') 
  </code></pre>
  
  <p>The <code>welcome.html</code> is fairly simple:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;&lt;span&gt;Welcome to this site&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This does not render the page welcome.html to the <code>&lt;div&gt;</code> section of the site. I understand that there are several responses on stackoverflow that already addressed how to load a page with jquery (e.g. using <code>load()</code>); however, I specifically want to use my implementation for legacy reasons. Where did I miss?</p>