There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Script files included on the page in the incorrect order
As noted in discussion 401601, I have experienced rare occasions where the scripts included on the page where not rendered in the same order in which they were declared. This causes problems when one script is dependent on another.
In my case, I was using the following to add scripts to the page:
This was performing as expected for a long time- and then out of the blue, the order the scripts were rendered was changed. As a workaround, I appended .AtHead() to the jQuery require. I then removed the .AtHead() method and the scripts were again displayed
in the order that you would expect them to be.
This problem appears to be very intermittent and I have not since been able to reproduce. One thing that may be of worth to note is that the scripts appeared to have been rendered in the order of all the Script.Includes first, and then the Script.Requires after
eg as if they were declared as follows: