Skip to content

Instantly share code, notes, and snippets.

@tjp
Created July 30, 2009 11:53
Show Gist options
  • Save tjp/158664 to your computer and use it in GitHub Desktop.
Save tjp/158664 to your computer and use it in GitHub Desktop.
overlay x y
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>example</title>
</head>
<body>
<div id="myContent" style="background: red; opacity:.5;">
<div class="yui-widget-hd">Overlay Header</div>
<div class="yui-widget-bd">Overlay Body</div>
<div class="yui-widget-ft">Overlay Footer</div>
</div>
<script type="text/javascript" src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js"></script>
<script type="text/javascript">
YUI().use("overlay",function(Y) {
var overlay = new Y.Overlay({
contentBox:"#myContent",
x: 100,
y:10
//xy: [100,10]
});
overlay.render();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment