Created
January 31, 2013 08:08
-
-
Save smat/4681195 to your computer and use it in GitHub Desktop.
Positioning not working correctly in IE7 with hidden div
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Test</title> | |
<script type="text/javascript" src="http://fgnass.github.com/spin.js/dist/spin.min.js"></script> | |
<script type="text/javascript"> | |
function testbug() { | |
var target1 = document.getElementById('spin-here1'); | |
var spinner1 = new Spinner().spin(target1); | |
var target2 = document.getElementById('spin-here2'); | |
var spinner2 = new Spinner().spin(target2); | |
target2.style.display = 'block'; | |
} | |
</script> | |
</head> | |
<body> | |
<h1>Testing broken IE7</h1> | |
<p>Spinner inside regular div</p> | |
<div style="border: solid black 1px; height: 64px; width: 64px;"> | |
<div id="spin-here1" style="margin-left: 16px; margin-top: 16px;"></div> | |
</div> | |
<p>Spinner inside hidden div</p> | |
<div style="border: solid black 1px; height: 64px; width: 64px;"> | |
<div id="spin-here2" style="margin-left: 16px; margin-top: 16px; display: none;"></div> | |
</div> | |
<button onclick="testbug();">Show spinner</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment