Skip to content

Instantly share code, notes, and snippets.

@tjp
Created August 18, 2009 15:51
Show Gist options
  • Save tjp/169793 to your computer and use it in GitHub Desktop.
Save tjp/169793 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>kit</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.0.0b1/build/cssreset/reset-min.css&amp;3.0.0b1/build/cssfonts/fonts-min.css" />
<style type="text/css">
div {
background: #eeeeee;
margin: 1em;
padding: 1em;
border: 1px solid #cccccc;
}
p {
margin: 1em;
padding: 1em;
background: #eeee77;
border: 1px solid #cccc55;
}
</style>
</head>
<body>
<div id="w">
<div>
<p>paragraph 1</p>
</div>
<p>paragraph 2</p>
<div></div>
<p>paragraph 3</p>
<div>
<p>paragraph 4</p>
</div>
</div>
<!--script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script-->
<script type="text/javascript" src="js/yui3/build/yui/yui-min.js"></script>
<script type="text/javascript">
YUI().use("node", "selector-css3", function(Y) {
var a = Y.get('#w').query('p:nth-of-type(1)'); a.set('innerHTML', a.get('innerHTML') + ' (paragraph 1 selon yui)');
var a = Y.get('#w').query('p:nth-of-type(2)'); a.set('innerHTML', a.get('innerHTML') + ' (paragraph 2 selon yui)');
var a = Y.get('#w').query('p:nth-of-type(3)'); a.set('innerHTML', a.get('innerHTML') + ' (paragraph 3 selon yui)');
var a = Y.get('#w').query('p:nth-of-type(4)'); a.set('innerHTML', a.get('innerHTML') + ' (paragraph 4 selon yui)');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment