質問

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