Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created August 25, 2009 19:22
Show Gist options
  • Save lsmith/174945 to your computer and use it in GitHub Desktop.
Save lsmith/174945 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title>Test Page</title>
</head>
<body>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript">
YAHOO.util.Event.onContentReady('a', function () {
YAHOO.util.Dom.get('a_done').innerHTML = "A DONE";
YAHOO.util.Event.on('btn','click', function () {
YAHOO.util.Event.onAvailable('b', function () {
alert("Hello");
});
});
});
</script>
<div class="markup">
<div id="a">
<button id="btn" type="button">Say hello</button>
<p id="a_done">A not done</p>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment