Skip to content

Instantly share code, notes, and snippets.

@sdesai
Created November 16, 2010 22:36
Show Gist options
  • Save sdesai/702658 to your computer and use it in GitHub Desktop.
Save sdesai/702658 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Widget uiEvents</title>
</head>
<body>
<script src="/YuiWip/yui3/build/yui/yui.js"></script>
<script>
YUI({filter:"raw"}).use("widget", function(Y) {
var w = new Y.Widget({
width:200,
height:200
}),
h = function(e) { Y.log(e.type); };
w.get("contentBox").append("Some Conent For My Widget");
w.on({
"click": h,
"mousedown" : h
});
w.render();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment