noviolence noviolence - 7 months ago 34
Javascript Question

TYPO3: get a javascript included by "headerData" to load before one included by "includeJS"

I'm loading JQuery into my TYPO3 page by :

page.headerData.10.value = <script type="text/javascript" src=""></script>

and I'm including my javascript like this :

page.includeJS {
file20 = fileadmin/templates/myjq.js

Point is, i need the JQuery to be loaded first. but TYPO3 puts it after my script.
How do i get it swapped?



you don't want to include JQuery that way; Use

page.includeJSlibs.jquery.external = 1
page.includeJSlibs.jquery = //


Edit Using a URL without a specific protocol (http or https) makes sure the inclusion works on both SSL and non-SSL-sites.