multiple-selectors.html revision 03aed120f9b4510029d41e97188f5887ca31516d
<html>
<head>
<title>YUI Multiple Selector Test-case</title>
</head>
<body class="yui-skin-sam">
<div id="doc">
<div id="mod1">
<div class="hd"><h3 class="title">H3 - Title</h3></div>
<div class="bd">
<p>another parragraph with a complex link <a href="#" id="secondlink"><span id="spanwithinlink">link</span></a></p>
</div>
</div>
</div>
<script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script>
<!-- YUI3 Core //-->
<!-- Initialization process //-->
<script type="text/javascript">
YUI({
base: "/build/",
filter: 'debug',
combine: false,
useConsole: true,
logExclude: {Dom: true, Node: true, attribute: true, base: true, event: true, widget: true}
}).use('dump', 'node', function (Y) {
var node = Y.get('#mod1');
Y.log ('Test 1: a');
node.queryAll('a').each(function (v, k) {
Y.log ('- Item# '+k+': '+v);
});
Y.log ('Test 2: a span');
node.queryAll('a span').each(function (v, k) {
Y.log ('- Item# '+k+': '+v);
});
Y.log ('Test 3: a, a span');
node.queryAll('a, a span').each(function (v, k) {
Y.log ('- Item# '+k+': '+v);
});
Y.log ('Test 4: a span, a');
node.queryAll('a span, a').each(function (v, k) {
Y.log ('- Item# '+k+': '+v);
});
});
</script>
</body>
</html>