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