Skip to content

Instantly share code, notes, and snippets.

@rainhead
Created August 8, 2009 01:01
Show Gist options
  • Save rainhead/164254 to your computer and use it in GitHub Desktop.
Save rainhead/164254 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Test</title>
<script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script>
</head>
<body>
<form>
<div class="thediv">
<textarea name="textarea">Foo</textarea>
</div>
<script type="text/javascript">
YUI().use('node', function(Y) {
var div = Y.get('.thediv'),
areaThenInput = div.query('textarea, input'),
inputThenArea = div.query('input, textarea');
Y.log("Textarea first: " + areaThenInput);
Y.log("Input first: " + inputThenArea);
});
</script>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment