Created
July 30, 2011 13:19
-
-
Save sgilligan/1115518 to your computer and use it in GitHub Desktop.
Overlay in 3.4PR3 throws Exception on show. Safari Only. 3.4PR2 ok.
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
<!DOCTYPE html> | |
<head> | |
<style type="text/css"> | |
.yui3-overlay-content {padding:2px; border:1px solid #000; background-color:#aaa; font-size:93%;} | |
.yui3-overlay-content .yui3-widget-hd {font-weight:bold; text-align:center; padding:2px; border:2px solid #aa0000; background-color:#fff;} | |
.yui3-overlay-content .yui3-widget-bd {text-align:left; padding:2px; border:2px solid #0000aa; background-color:#fff;} | |
</style> | |
<script type="text/javascript" src="http://yui.yahooapis.com/3.4.0pr3/build/yui/yui-min.js"></script> | |
</head> | |
<body class="yui3-skin-sam yui-skin-sam"> | |
<h1>Test Overlay Alignment</h1> | |
<button>show/hide</button> | |
<script type="text/javascript"> | |
YUI().use("overlay", function(Y) { | |
var toggle = true, | |
overlay = new Y.Overlay({ | |
width:"10em", | |
height:"10em", | |
headerContent: "Overlay", | |
bodyContent: "Overlay body content", | |
centered: true, | |
render: true, | |
visible: false | |
}); | |
Y.one('button').on('click', function() { | |
try { | |
if(toggle) overlay.show(); | |
else overlay.hide(); | |
} | |
catch(e) { | |
alert('caught error'); | |
} | |
toggle = !toggle; | |
}); | |
}); | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment