I am trying to call an external script with JQuery. I would usually use something like this:
<script src="../DashboardRecreationScripts/basicModel.js"></script>
However, I am already inside a script tag which includes a document.ready function so I can't make the call outside either.
This is the problem I am having:
I have made a call to an external file using this:
$.getScript("../DashboardRecreationScripts/basicModel.js").done(function (script, textStatus) {
alert(textStatus);
})
Inside the external file I have a backbone js model. This works fine. However, nothing below the '$.getScript()' has access to that model. Even though they are all wrapped in a document ready function.
Thanks