Skip to content

Instantly share code, notes, and snippets.

@sandeep45
Created August 12, 2013 14:23
Show Gist options
  • Save sandeep45/6211245 to your computer and use it in GitHub Desktop.
Save sandeep45/6211245 to your computer and use it in GitHub Desktop.
Firefox Issue with not honoring show() on an element inside an iframe when the iframe itself hidden
<html>
<head>
<style>
#bla{
display: none
}
</style>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function(){
window.setTimeout(function(){
$("#bla").show();
},2000);
});
</script>
</head>
<body>
<iframe src="firefoxShowIssueIframe.html" id="bla" />
</body>
</html>
<html>
<head>
<style>
#xyz{
display:none;
}
</style>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function(){
$("#xyz").show();
});
</script>
</head>
<body>
<span id="xyz">I am the spans content</span>
</div>
</body>
</html>
@sandeep45
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment