anim.html revision d0a16c48f3477794c63f4ff3242dc20db6a49295
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
html, body {
padding:0;
margin:0;
}
.yui3-overlay-content {
background-color:#ccc;
border:1px solid green;
}
</style>
</head>
<body>
<script src="/build/yui/yui.js"></script>
<script src="/build/widget-anim/widget-anim.js"></script>
<button id="btn" type="button">Toggle</button>
<script>
YUI({filter:"raw"}).use("anim", "widget-anim", "overlay", function(Y) {
var o = new Y.Overlay({
visible:true,
height:"200px",
width:"200px",
xy: [100,100],
bodyContent:"Body",
headerContent:"Header",
footerContent:"Footer",
render:"#constraint"
});
o.plug(Y.Plugin.WidgetAnim);
Y.Node.one("#btn").on("click", function() {
o.set("visible", !o.get("visible"));
});
});
</script>
</body>
</html>