title: Javascript - script load order
body: <p>I have this code:</p>
  
  <pre><code>$("#pop_mali_oglas").on('click', function(){
          TINY.box.show({url:'&lt;?php echo base_url()?&gt;form/novi_unos/&lt;?php echo $p ?&gt;'});
          $.getScript("&lt;?php echo JS ?&gt;vendor/jquery.ui.widget.js");
          $.getScript("&lt;?php echo JS ?&gt;tmpl.min.js");
          $.getScript("&lt;?php echo JS ?&gt;load-image.min.js");
          $.getScript("&lt;?php echo JS ?&gt;canvas-to-blob.min.js");        
          $.getScript("&lt;?php echo JS ?&gt;bootstrap.min.js");        
          $.getScript("&lt;?php echo JS ?&gt;bootstrap-image-gallery.min.js");     
          $.getScript("&lt;?php echo JS ?&gt;jquery.iframe-transport.js");
          $.getScript("&lt;?php echo JS ?&gt;jquery.fileupload.js");
          $.getScript("&lt;?php echo JS ?&gt;jquery.fileupload-ip.js");
          $.getScript("&lt;?php echo JS ?&gt;jquery.fileupload-ui.js");
          $.getScript("&lt;?php echo JS ?&gt;locale.js");        
          $.getScript("&lt;?php echo JS ?&gt;main.php");       
          return false;                    
  });
  </code></pre>
  
  <p>The first line is loading last ( <code>TINY.box.show({url:'&lt;?php echo base_url()?&gt;form/novi_unos/&lt;?php echo $p ?&gt;'});</code>) and I need it to load first, and then the rest. How can I do this?</p>