load the other javascript with ajax through $.when() function, and also remove all the js load on html page