title: jQuery doesn't work when delivered with flask but works otherwise
body: <p>I'm pretty new to python, even less experienced with flask, and I cannot figure out this issue. I have the following simple web page with jQuery functionality that works great when I double click the file and open it in a browser:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script src="jquery-3.3.1.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $("#updateBtn").on("click", function() {
                  text = "&lt;h2&gt;The div has been updated!&lt;/h2&gt;";
                  $("#jQuery_div").html(text);
              });
          });
      &lt;/script&gt;
      &lt;div&gt;
          &lt;h1&gt;This is a non-jQuery div&lt;/h1&gt;
      &lt;/div&gt;
      &lt;div id="jQuery_div"&gt;
          &lt;h2&gt;This div should update with jQuery&lt;/h2&gt;
      &lt;/div&gt;
      &lt;button id="updateBtn"&gt;update&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However, when flask delivers the web page on localhost:5000, the jQuery functionality is no longer present. My python is as follows:</p>
  
  <pre><code>from flask import Flask, render_template
  app = Flask(__name__)
  
  @app.route('/')
  def render():
      return render_template("jquery_test.html")
  
  if __name__ == "__main__":
      app.run(port=5000, debug=True)
  </code></pre>
  
  <p>My app's file tree is:</p>
  
  <pre><code>/AJAX_practice
      ajax_practice.py
      /templates
          jquery-3.3.1.js
          jquery_test.html
  </code></pre>
  
  <p>I was trying to follow <a href="http://www.giantflyingsaucer.com/blog/?p=4310" rel="nofollow noreferrer">this tutorial</a> when I couldn't get the "echo" button to work. In my efforts to debug, I have slowly chipped away and drastically simplified the program to the above code to see why I cannot get my jQuery to work through flask. I am still at a loss. I am running the flask app by pressing F5 in IDLE, with no errors in Python 2.7.13 Shell, and the Terminal (from which I started IDLE with <code>$ sudo idle</code>) showing:</p>
  
  <pre><code>my ip - - [date and time] "GET / HTTP/1.1" 200 -
  my ip - - [date and time] "GET /jquery-3.3.1.js HTTP/1.1" 404 -
  </code></pre>
  
  <p>From this, my best guess is that flask cannot find the jquery.3.3.1.js file, though I have tried putting it everywhere in the file tree with no luck. I cannot use the script src to https for jQuery dependencies, as my server will eventually be on a non-internet connected LAN. Am I on the right track? If so, how does flask find and/or navigate jQuery dependencies? Can anyone point me towards some documentation that might help my fundamental understanding of this issue?</p>
  
  <p>Any help on this matter would be greatly appreciated.</p>