pseudo code is as follows;
</script>
<script>
$(function(){
$("-sharpeng").on("click", function(){
fn1();
fn2();
fn3();
});
function fn1(){
console.log("fn1");
};
function fn2(){
console.log("fn2");
}
function fn3(){
console.log("f3");
}
});
function fnK1(){
console.log("fnK1");
}
function fnK2(){
console.log("fnK2");
}
function fnK3(){
console.log("fnK3");
}
fnK1();
fnK2();
fnK3();
</script>
the logic here is that the three methods fnK1 (), fnK2 (), fnK3 () are loaded normally; after clicking the id=eng link, load the three methods in the click event;
< hr > updated the pseudo code of the main building, you can run it locally;
extracted the code and wrote a demo to locate the problem, and all three methods fn1 () were executed; I know that this problem is caused because the three methods fnK1 () are executed in the last sequence; therefore, there should be something wrong with the logic of this code.