Skip to content

Instantly share code, notes, and snippets.

@sdesai
Created November 23, 2010 01:47
Show Gist options
  • Save sdesai/711101 to your computer and use it in GitHub Desktop.
Save sdesai/711101 to your computer and use it in GitHub Desktop.
YUI({filter:"raw"}).use("overlay",
function(Y) {
var o = new Y.Overlay({
width:300,
height:300,
align: {
node:"#location_inp",
points:["tl", "bl"]
}
});
o.render();
var doAlign = function() {
o.set("align", o.get("align"));
};
var h;
Y.on("resize", function() {
if (Y.UA.ie) {
if (h) {
h.cancel();
}
h = Y.later(100, null, function () {
doAlign();
});
} else {
doAlign();
}
}, window);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment