I'm trying to load an external JavaScript file via jQuery's .ajax() function (tried .getScript(), but it has the same problem).
According to the documentation, and testing, it doesn't fire error events, or even any of the global AJAX events when there is an error when loading script's from a remote source.
As far as I can see, the only event that is fired in the success event.
My question is: how can I detect if the remote script fails to load.
I can't alter the remote script, but I can detect if it has loaded. (By checking if a variable is defined).
<script>tags? Or copy it locally so you know it will be available?