-/*
+/**
* JavaScript for loading more JavaScripts with AJAX
* --------------------------------------------------------------------
- * $Revision:: $
- * $Date:: $
- * $Tag:: 0.2.1-FINAL $
- * $Author:: $
- * --------------------------------------------------------------------
* Copyright (c) 2003 - 2009 by Roland Haeder
- * Copyright (c) 2009 - 2012 by Mailer Developer Team
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team
* For more information visit: http://mxchange.org
*
* This program is free software; you can redistribute it and/or modify
$.holdReady(false);
} else {
// Recursive call again
- window.setTimeout('loadScriptsLocked()', 10);
+ window.setTimeout('loadScriptsLocked()', 100);
}
}
// Loads more JavaScript resources
function loadScripts (resources) {
// Abort here if resources is not defined
- if (resources == undefined) {
+ if (typeof(resources) === 'undefined') {
// This is really bad ...
throw new 'loadScripts() called with no resources (JavaScript files) to load!';
} // END - if
// Begin the loop for all JavaScript files
for (var i = 0; i < resources.length; i++) {
// Is the script set?
- if (resources[i] == undefined) {
+ if (typeof(resources[i]) === 'undefined') {
// Array element is missing, which means someone mades a boo boo ...
throw new ('resources[' + i + '] not set. Please fix your array.');
} // END - if
// Count it as loaded
resourceCounter++;
});
+
+ // Wait here a little
+ $('body').delay(100);
} // END - for
// Wait until all scripts are loaded (asynchronously)