Created
September 13, 2013 17:08
-
-
Save yarosla/6553342 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
body {padding:20px;} |
This file contains hidden or 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
<!DOCTYPE html> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Foundation 4 Bin</title> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.3.1/css/normalize.min.css" rel="stylesheet" type="text/css" /> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.3.1/css/foundation.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.3.1/js/vendor/custom.modernizr.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.3.1/js/vendor/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.3.1/js/foundation.min.js"></script> | |
</head> | |
<body> | |
<p>foundation.reveal.js bug. Wrong background switching when opening new modal before animation completes.</p> | |
<p>Modal background remains shown.</p> | |
<div id="myModal" class="reveal-modal"> | |
<h2>Awesome. I have it.</h2> | |
<p class="lead">Your couch. It is mine.</p> | |
<p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p> | |
<a class="close-reveal-modal">×</a> | |
</div> | |
</body> | |
</html> |
This file contains hidden or 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
$(function(){ | |
$(document).foundation(); // initialize foundation | |
$('#myModal').foundation('reveal', 'open'); // open modal | |
setTimeout(function(){ | |
// close it after 1 second | |
$('#myModal').foundation('reveal', 'close'); | |
}, 1000); | |
setTimeout(function(){ | |
// open again before animation completes | |
// (default animation duration is 250 ms) | |
$('#myModal').foundation('reveal', 'open'); | |
}, 1200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment