Tested on Safari 5 for Mac OS X and on Safari for iOS devices:
When loading Javascripts within an ajax response, they are executed in the wrong order if the ajax request is made from a local file to a remote server (such as in a phonegap application).
To better demonstrate this issue, I have created some demo scripts:
(You will need to save this file to your local disk to replicate the problem)
Does anyone know why this occurs and how to ensure the correct script execution order?