Jquery 跳转到else语句上的另一个(单独)函数
例如:我有另一个函数(跳转)。我想在else语句之后运行函数,我不想在前面的代码中使用它Jquery 跳转到else语句上的另一个(单独)函数,jquery,Jquery,例如:我有另一个函数(跳转)。我想在else语句之后运行函数,我不想在前面的代码中使用它 $(document).ready(function() { if ( // condition ) { //do stuff } else ( // how do you jump to another separate function from this else statement? ) {}; }); 只需从else条件调用函数。只需调用else部分中的j
$(document).ready(function() {
if ( // condition ) {
//do stuff
}
else ( // how do you jump to another separate function from this else statement? ) {};
});
只需从else条件调用函数。只需调用
else
部分中的jump
方法
function jump(e) {
// blah blah
};
跳转到另一个函数是什么意思?只需在else部分调用
jump()
$(document).ready(function() {
if ( condition ) {
//do stuff
} else {
jump();
}
});