我有一个<tr>将在删除按钮时被删除,但在做之前.remove()或empty()我想等待一些fadeOut()效果.
$(this).closest('tr').fadeOut();
setTimeout("$(this).closest('tr').remove()",1000);
Run Code Online (Sandbox Code Playgroud)
它不起作用,它只会淡出.
Sin*_*nan 19
你需要一个回调后fadeOut()
$(this).closest('tr').fadeOut(400, function(){
$(this).remove();
});
Run Code Online (Sandbox Code Playgroud)
它在fadeOut()操作完成后立即触发回调,在这种情况下400ms.
希望这会有所帮助,思南.
| 归档时间: |
|
| 查看次数: |
8290 次 |
| 最近记录: |