I'm adapting a custom component to Joomla 3. It relies on jQuery, which I previously loaded in myself. Now that it's included in the base template, I don't need to. However, my custom javascript that relies on jQuery is being loaded first. I load them using the following form:
$document = JFactory::getDocument();
$document->addScript( PATH TO SCRIPT);
This properly includes them in the <head>
element, but they are loaded before jQuery.
Some quick searching reveals abstract class JHtmlJquery
in libraries/cms/html/jquery.php
but I'm unsure of from where this is called.
How can I change the load order so that jQuery is loaded before my scripts that depend upon it? And can I do this without getting into the core code?