I am not sure how to solve this issue. Lets assume we have two functions like this:
JSLint will complain that rebind_test2(); is not defined before it is accessed. And if I move rebind_test2() above the first function, it will complain again that rebind_test1(); is not defined before its accessed. Is there a solution to this?
function rebind_test1(){
"use strict";
$('#row').load('test/', function(result){
rebind_test2();
});
}
function rebind_test2(){
"use strict";
var i = 1;
rebind_test1();
}
@torazaburo’s answer will work, and alternatively you can just pretend that the function declared second is “global” (as if it was declared in a different file):