1

我有关闭弹出窗口的功能:

function unloadPopupBox() { // TO Unload the Popupbox
            $('#popup_box').fadeOut("slow");
            $("#container").css({ // this is just for style     
                "opacity": "1"  
            }); 
        }   

我在某些包含图表的场合显示此窗口。此图表包含大量数据点,可能会降低浏览器的速度。当我关闭它时,是否可以清除此 div 中的数据。除了 fadeOut,我还可以使用什么其他方法来删除此 popup_box div 中的数据?

4

3 回答 3

4

您可以$('#popup_box').empty();清空 div。如果你想在淡入淡出动画结束后这样做:

$('#popup_box').fadeOut("slow", function(){
  $(this).empty();
});
于 2013-07-10T21:23:04.763 回答
1
$('#popup_box').empty()

这清除了div

于 2013-07-10T21:23:07.023 回答
0

Without seeing any code, one simple way is to delete the innerHTML of that <div>:

document.getElementByID(#ID).innerHTML = '';
于 2013-07-10T21:24:40.970 回答