我遇到了一个脚本的麻烦, 它在隐藏类后删除了对象 X 时间 。
selector = getselector($(this).parent().parent());
console.log("Clicked Cancel");
$(this).parent().parent().addClass( hidden );
setTimeout(function() {
$(selector).remove();
}, 400);
I edited some piece of script from here to make function getselector since $(this) doesn t work within a setTimeout. now this piece of code works, as long as you don t run it too quickly again. problem seems to be that variable selector gets messed up when a another node gets deleted within the timespan (currently 400ms)
我无法想到一个简单的方法绕过它。 (笑声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声) (掌声)