【发布时间】:2017-05-19 09:52:57
【问题描述】:
我想先删除 div,然后显示我的弹出窗口。但是在显示警报时,我可以看到 div。 关闭弹出窗口后,div 将被删除。
$("#btnRemoveDiv").on("click",function(){$("#divRemove").remove();
alert("Removed");});
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<div id="divRemove">Remove this div first then show the popup. Dont show this while the popup is opened!</div>
<input type="button" id="btnRemoveDiv" value="Remove">
@quirimmo 请看这个:
【问题讨论】:
-
嗨 Divya,请添加您的 jsfiddle 编辑您的问题,这样更容易检查阅读问题的人
-
看起来对我有用(Edge 和 Firefox)。
-
也在 chrome 上工作。
-
对我来说它也不适用于 chrome
标签: javascript jquery