mas*_*ean 9 javascript google-chrome settimeout
这个setTimeout在Firefox中完美运行,但在Chrome中,函数timeoutTrigger中没有任何内容发生,包括警报.有任何想法吗?
var $this = $('.active-more');
function timeoutTrigger() {
$this.closest(".container").nextAll(".container:first").find(".description:first").removeClass('hide');
$this.closest(".container").nextAll(".container:first").find(".back:first").find("img.portfolio").remove();
alert("is this thing on?");
}
setTimeout(function(){timeoutTrigger()},400)
Run Code Online (Sandbox Code Playgroud)
将您的setTimeout语句切换为以下内容:setTimeout(timeoutTrigger,400);
您编写的语句适用于您正在调用的函数具有参数的情况.另外,你错过了一个分号.
| 归档时间: |
|
| 查看次数: |
22602 次 |
| 最近记录: |