Skip to content

Instantly share code, notes, and snippets.

@zenorocha
Last active December 11, 2015 05:28
Show Gist options
  • Save zenorocha/4552650 to your computer and use it in GitHub Desktop.
Save zenorocha/4552650 to your computer and use it in GitHub Desktop.
jQuery - YUI - AlloyUI: Rosseta Stone
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$('div.foo:first')</title>
</head>
<body>
<div class="foo" id="1"></div>
<div class="foo" id="2"></div>
<div class="foo" id="3"></div>
<!-- jQuery 1.8.3 -->
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
$(function() {
console.log( $('div.foo:first') );
});
</script>
<!-- AUI contains YUI -->
<script src="http://deploy.alloyui.com/build/aui/aui.js"></script>
<!-- AUI 1.7.0 -->
<script>
AUI().use('node', function (A) {
console.log( A.one('div.foo') );
});
</script>
<!-- YUI 3.8.0 -->
<script>
YUI().use('node', function (Y) {
console.log( Y.one('div.foo') );
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment