我正在尝试清除此超时,以便在单击此按钮时重新启动,但它无法正常工作:\
var confirmAlbumDelete;
$("body").on("click", ".upload-result-wrapper .top-details .delete", function(){
clearTimeout(confirmAlbumDelete);
$this = $(this);
$this.text("Yes, Delete Album").addClass("confirm-delete");
confirmAblumDelete = setTimeout(function(){$this.text("Delete Album").removeClass("confirm-delete")},10000);
});
答案 0 :(得分:4)
您错误拼写了变量名称:
confirmAblumDelete = setTimeout
^^