Skip to content

Instantly share code, notes, and snippets.

@triptych
Created October 4, 2010 18:15
Show Gist options
  • Save triptych/610178 to your computer and use it in GitHub Desktop.
Save triptych/610178 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>yui logging</title>
<script type="text/javascript"
src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js">
</script>
</head>
<body>
<div id="something">Hello World </div>
<script>
YUI().use('node', function(Y) {
//you get Y.log for "free"
Y.log("Hi there!")
//you can output javascript objects as well
foo = {bar:"baz", bat: "bam"}
Y.log(foo);
//you can also output other YUI elements
Y.log(Y.one("#something"));
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment