title: Load script order in Joomla 2.5
body: <p>I need to load a jquery script when loading my Joomla 2.5 component; in my view i added:</p>
  
  <pre><code>function display($tpl = null)
  {
  // Display the template
  $document = JFactory::getDocument();
  $document-&gt;addScript("components/com_myname/assets/js/script.js","text/javascript",true);
  parent::display($tpl);
  }
  </code></pre>
  
  <p>but the script is never executed because the script.js is loaded before the jquery.js.
  How can I establish the load order of the scripts without hacking joomla core or template files? </p>