Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (70 sloc) 2.303 kb
2332bb5 @davglass Initial Import
authored
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>Example</title>
5 <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css">
6 <link rel="stylesheet" type="text/css" href="http://developer.yahoo.com/yui/assets/dpSyntaxHighlighter.css">
7 <style type="text/css" media="screen">
8 p, h2 {
9 margin: 1em;
10 }
11 #demo {
12 border: 1px solid black;
13 background-color: #ccc;
14 height: 100px;
15 width: 100px;
16 }
17 #demo.over {
18 background-color: yellow;
19 }
20 </style>
21 </head>
22 <body>
23 <div id="doc3" class="yui-t7">
24 <div id="hd"><h1 id="header">Example</h1></div>
25 <div id="bd">
26 <div id="demo"><strong>Here.</strong></div>
27 <ul>
28 <li>item</li>
29 <li>item</li>
30 <li>item</li>
31 <li>item</li>
32 <li>item</li>
33 <li>item</li>
34 <li>item</li>
35 <li>item</li>
36 </ul>
37 </div>
38 <div id="ft">&nbsp;</div>
39 </div>
40 <script src="http://github.com/yui/yui3/raw/master/build/yui/yui-min.js"></script>
41 <script src="node-extras.js"></script>
42 <script>
43 YUI({
44 base: 'http://github.com/yui/yui3/raw/master/build/',
45 combo: false
46 }).use('node', 'node-extras', 'selector-css3', function(Y) {
47 console.log(Y);
48 Y.get('#demo').hover(function() {
49 this.addClass('over');
50 }, function() {
51 this.removeClass('over');
52 });
53 Y.get('#demo').on('click', function() {
54 this.append(' **foo** ');
55 this.css('backgroundColor', 'red');
56 });
57 //Y.all('li:nth-child(odd)').setStyle('backgroundColor', 'blue');
58 //Y.all('#bd ul li').odd().setStyle('color', 'yellow');
59 //Y.all('#bd ul li').even().setStyle('color', 'red').end().setStyle('border', '1px solid black');
60 Y.all('#bd ul li').hover(function() {
61 this.css('fontWeight', 'bold');
62 this.append('<span> ***</span>');
63 }, function() {
64 this.css('fontWeight', '');
65 this.query('span:last-child').remove();
66 });
67
68 });
69 </script>
70 </body>
71 </html>
Something went wrong with that request. Please try again.