Outputting JS after /concrete/js/app.js

Permalink
One of my packages uses ConcreteAjaxSearch and I therefore want to load its JavaScript after /concrete/js/app.js.

If I use requireAsset with an ASSET_POSITION_FOOTER position, it's still before app.js.

Is there a workaround?

Thanks, Adri

A3020
 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
If the script is in a ready handler, it won't get run until after all other scripts have been loaded. So the script loading order doesn't matter.

If there are other ready handlers that need to run first, you can cause a change of execution sequence by inserting a zero timeout.
A3020 replied on at Permalink Reply
A3020
I got it working now, thanks for your explanation.