i have a div with iframe that loads pdf file. it will appear when the pdf icon is clicked and there's a label "X" that when clicked will hide the div (onclick event, just change display to block). But what happens is when trying to close the div, the loaded page was gone too, all you see is white screen. i have to press F12 to make the page appear again. The page runs in Firefox, Chrome and Safari as it should be, i have this problem or behavior in IE9-IE11 only. But the weird part is when i test the page using BrowserStack, everything is fine with the browserstack. Any idea on why this is happening?
<div class="pdf-file" style="display: none;">
<label>X</label>
<iframe src="blah" scrolling="no" width=400 height=400 class="pdf-class"></iframe>
</div>
Please note, the position of this div is absolute.
Onclick Event:
$('#pdf img).click(function() {
$('.pdf-file').show();
}
$('.pdf-file label).click(function() {
$('.pdf-file').hide();
}
the javascripts are as simple as the above, and the behavior just happens recently and i don't understand why and i can't remember changing something big in the page that made this behavior, it was working good before.