title: How do I force jQuery to load first?
body: <p>I am trying to add bootstrap-select to my Flask app and I keep running into the error "TypeError: $(...).selectpicker is not a function". Everything I've read says this only occurs if you load jQuery again after loading bootstrap-select.js, so I went through and cleaned up my scripts, ensuring that jQuery was being loaded before all my other JS scripts, like so:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"&gt; &lt;/script&gt;
  ...
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>However, I was still getting the same problem. I decided to take a look at the order of loading in the chrome developer tools window, and now I think my problem is this: jQuery is being <em>queued</em> for loading before bootstrap-select, but it's not actually <em>starting</em> the download until after bootstrap-select has already finished. I suspect this is because of the difference in size between the two. </p>
  
  <p>Is there any way I can force my other scripts to delay loading until after jQuery has already loaded? Or if I figure out how to cache a copy of jQuery in my static directory, will that help?</p>
  
  <p><strong>Edit:</strong> Wow, okay, I got a lot of comments on this! To try and clarify as much as possible, I'm just going to make some notes:</p>
  
  <ul>
  <li>After thoroughly checking all my scripts, I can confirm that only one copy of jQuery is being loaded.</li>
  <li>This is not an https page, I'm running it locally on a Flask development server.</li>
  <li>I checked the bootstrap-select url I have in my code and it is the correct one. Sorry, I'm not sure why it left out the dash when I was copy-pasting. I have corrected the question accordingly.</li>
  <li>I have been using the Network tab in chrome's dev tools to check loading successes/times.</li>
  <li>I moved my jQuery to the very beginning of the file to ensure it would load first, and I can now confirm it is finished loading before bootstrap-select loads.</li>
  </ul>
  
  <p>Despite all this, I'm continuing to get the same error, so if anyone has other suggestions I would appreciate them. I'm completely out of ideas at this point.</p>