Load JS API Dynamically

Discussion created by shaun_weston-eagle-co-nz-esridist on Oct 5, 2013
I'm trying to load the Javascript API dynamically, so basically what I'm trying to do is load the jQuery library then once that has loaded, load the ArcGIS JS library, like this:

    <script type="text/javascript" src="libraries/jQuery/1.10.1/jquery-1.10.1.min.js"></script>
    <script type="text/javascript" src="libraries/jQueryUI/1.10.3/jquery-ui.min.js"></script>    
    <script type="text/javascript">
        <!-- When jQuery has loaded -->
        $(document).ready(function () {
            // Show the progress bar
                value: false

Doesn't seem to work though. Anyone have any experience with something like this?