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