문제

I am trying to clear this timeout so it restarts when this button has been clicked, however it isn't working :\

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);
});
도움이 되었습니까?

해결책

You misspelled the variable name:

confirmAblumDelete = setTimeout
        ^^
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top