title: Jquery elements only work after page refresh
body: <p>I am building  Reacts based application, I have a few jquery elements on the page such a the JqueryUI date picker and bootstraps tooltip.</p>
  
  <p>The problem is these elects do not work until i reload the page.</p>
  
  <p>So its like the jQuery scripts are not be loaded the first time around.</p>
  
  <p>I have looked through the console and cannot see any errors related to jQuery/javascript.</p>
  
  <p>Any help would be much appreciated. here is my index.html page</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html class="no-js" lang=""&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
        &lt;meta name="description" content=""&gt;
        &lt;meta name="viewport" content="width=device-width"&gt;
  
        &lt;title&gt;ICETEA&lt;/title&gt;
  
        &lt;!-- Latest compiled and minified JavaScript --&gt;
        &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
        &lt;script src="https://code.jquery.com/jquery-2.1.3.min.js"&gt;&lt;/script&gt;
  
        &lt;!-- JQuery UI JS - Used for the datepicker --&gt;
        &lt;script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt;
  
        &lt;!-- Bootstrap theme --&gt;
        &lt;link href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"&gt;
  
        &lt;link rel="stylesheet" href="/css/main.css"&gt;
        &lt;!-- JQuery UI CSS - Theme: Blitzer, used for the datepicker --&gt;
        &lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/blitzer/jquery-ui.css"&gt;
  
    &lt;/head&gt;
    &lt;body&gt;
  
      &lt;div id="app"&gt;&lt;/div&gt;
  
      &lt;script src="/js/main.js"&gt;&lt;/script&gt;
  
      &lt;script&gt;
        $(document).ready(function(){
            $('[data-toggle="tooltip"]').tooltip();
        });
      &lt;/script&gt;
  
      &lt;script&gt;
        $(function() {
          $( "#datepicker" ).datepicker();
          $( "#datepicker" ).change(function() {
            $( "#datepicker" ).datepicker( "option", "dateFormat", "DD d MM" );
          });
        });
      &lt;/script&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>