function loadScripts(priorityScripts, scripts) {
    var body = document.body || document.getElementsByTagName("body")[0];

    // load parent of js recursively
    // download priority script first
    loadScript(body, priorityScripts.shift(), function lambda() {
        if(priorityScripts.length > 0) {
            loadScript(body, priorityScripts.shift(), lambda);
        }else{
            for(var i = 0; i < scripts.length; i++){
                loadScript(body, scripts[i]);
            }
        }
    });
}
/**
 * add js dynamically
 *
 * @param priorityScripts first load js
 * @param scripts normal js
 * @param readyCallback
 */
add js dynamically
@param priorityScripts first load js
@param scripts normal js
@param readyCallback
add js dynamically @param priorityScripts first load js @param scripts normal js @param readyCallback
function loadScripts(priorityScripts, scripts) {
    var body = document.body || document.getElementsByTagName("body")[0];
    loadScript(body, priorityScripts.shift(), function lambda() {
        if(priorityScripts.length > 0) {
            loadScript(body, priorityScripts.shift(), lambda);
        }else{
            for(var i = 0; i < scripts.length; i++){
                loadScript(body, scripts[i]);
            }
        }
    });
}
function loadScripts ( priorityScripts , scripts ) { var body = document . body || document . getElementsByTagName ( "body" ) [ 0 ] ; loadScript ( body , priorityScripts . shift ( ) , function lambda ( ) { if ( priorityScripts . length > 0 ) { loadScript ( body , priorityScripts . shift ( ) , lambda ) ; } else { for ( var i = 0 ; i < scripts . length ; i ++ ) { loadScript ( body , scripts [ i ] ) ; } } } ) ; }
add js dynamically
 @param priorityScripts first load js
 @param scripts normal js
 @param readyCallback
add js dynamically @param priorityScripts first load js @param scripts normal js @param readyCallback
// load parent of js recursively // download priority script first