I need to be able to insert or call a function before document.ready () is called in jQuery. I call the document.ready function from another file, which theoretically gives me control over calling document.ready.
Source file (.js):
$(document).ready(function () {
});
Technically, as soon as I call the file with document.ready (), it immediately loads, and I had no chance to find something like the precondition for inserting and calling my function.
Test file (also .js):
TestFunction.prototype.testFunction = function() {
$.readyList[1]();
}
Since I call the document.ready function from the .js unit test file, the tag
source
share