-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselection.html
287 lines (256 loc) · 16.9 KB
/
selection.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>HTML5 Fundamentals</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="img/favicon.png">
<link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="css/site.css" type="text/css" />
<link rel="stylesheet" href="js/highlight/styles/github.css" />
<script src="js/modernizr.min.js" type="text/javascript"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/bootstrap.js" type="text/javascript"></script>
<script src="js/highlight/highlight.pack.js" type="text/javascript"></script>
<script src="js/app.js" type="text/javascript"></script>
</head>
<body>
<main>
<header>
<!-- Fixed navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img src="img/html5-fundamentals.png" title="HTML5 Fundamentals" class="hidden-sm" />
<img src="img/html5.png" title="HTML5 Fundamentals" class="visible-sm" />
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="example.html" class="nav-link">Example</a></li>
<li class="separator visible-md visible-lg">|</li>
<li><a href="selection.html" class="nav-link">Selection</a></li>
<li>
<div class="dropdown">
<span class="nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Forms<span class="caret"></span>
</span>
<ul class="dropdown-menu" aria-labelledby="dLabel">
<li><a href="forms-markup.html">Forms</a></li>
<li><a href="forms-pseudo-classes.html">Pseudo Classes</a></li>
<li><a href="forms-validation.html">Native Validation</a></li>
<li><a href="forms-validation-custom.html">Custom Validation</a></li>
<li><a href="forms-validation-bootstrap.html">Bootstrap Module</a></li>
</ul>
</div>
</li>
<li>
<div class="dropdown">
<span class="nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Media<span class="caret"></span>
</span>
<ul class="dropdown-menu" aria-labelledby="dLabel">
<li><a href="media-basics.html">Basics</a></li>
<li><a href="media-scripted.html">Scripted Controls</a></li>
<li><a href="media-dynamic.html">Dynamic Load</a></li>
</ul>
</div>
</li>
<li>
<div class="dropdown">
<span class="nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Canvas<span class="caret"></span>
</span>
<ul class="dropdown-menu" aria-labelledby="dLabel">
<li><a href="canvas-basics.html">Basics</a></li>
<li><a href="canvas-manipulation.html">Manipulation</a></li>
<li><a href="canvas-clipping.html">Clipping</a></li>
<li><a href="canvas-charts.html">Charts</a></li>
<li><a href="canvas-video.html">Video</a></li>
</ul>
</div>
</li>
<li>
<div class="dropdown">
<span class="nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Drag & Drop<span class="caret"></span>
</span>
<ul class="dropdown-menu" aria-labelledby="dLabel">
<li><a href="dd-basics.html">Basics</a></li>
<li><a href="dd-effects.html">Effects</a></li>
<li><a href="dd-datatransfer.html">Data Transfer Types</a></li>
<li><a href="dd-files.html">Files</a></li>
</ul>
</div>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
</header>
<article id="content-container" class="container">
<div>
<!-- Nav tabs -->
<ul class="nav nav-tabs code-tabs" role="tablist">
<li role="presentation" class="active"><a href="#content-tab" aria-controls="content" role="tab" data-toggle="tab">Content</a></li>
<li role="presentation"><a href="#markup-tab" aria-controls="markup" role="tab" data-toggle="tab">Markup</a></li>
<li role="presentation"><a href="#css-tab" aria-controls="profile" role="tab" data-toggle="tab">CSS</a></li>
<li role="presentation"><a href="#javascript-tab" aria-controls="messages" role="tab" data-toggle="tab">JavaScript</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade in active" id="content-tab">
<!-- example markup -->
<div id="example-container">
<img src="img/coded-homes-logo-sm.png"
class="img-responsive" />
<img src="img/home.jpg"
class="thumbnail img-responsive push-down-top" />
<section class="description">
<p class="h5">Five bedrooms, three full baths and 3,702 square feet of living space.</p>
<p>Extra-tall double-door entry opens to an inviting and spacious foyer. Formal living and dining rooms featuring see through fireplace.</p>
<p>Large gourmet kitchen with granite countertops, stainless steel appliances with double ovens. Arrow shaped center island, huge, walk in pantry and lots of cabinets for storage. Large eating area off the kitchen for the family to enjoy meals together.</p>
<p>The front bedroom with full bathroom just outside the door. Huge family room with recessed entertainment area complete with recessed lighting and ceiling fan. The huge master suite features a soaker tub, large shower, walk-in closet and an additional over-sized walk-in closet. The master bath features split sinks with granite countertops. 3 large, secondary bedrooms and large bathroom that is great for kids to share.</p>
<p>Also includes: 3 car garage, high ceilings throughout, wired for spa in backyard, dual pane windows, new tile and carpet on bottom floor and large, upstairs laundry room. Nicely landscaped backyard with the best views in the Temescal Valley.</p>
</section>
<h2 class="h4">Features</h2>
<ul>
<li class="feature">Luxurious sized master suite</li>
<li class="feature">Oversized walk-in closet</li>
<li class="feature">Frameless Beech cabinetry with concealed hinges</li>
<li class="feature">Elegant slab white quartz countertops with large backsplash</li>
<li class="feature">Dual china sinks with Moen faucets</li>
<li class="feature">Clear frameless shower enclosures</li>
</ul>
</div>
<!-- /example markup -->
</div>
<div role="tabpanel" class="tab-pane fade" id="markup-tab">
<pre><code class="html hljs"><div id="example-container">
<img src="img/coded-homes-logo-sm.png"
class="img-responsive" />
<img src="img/home.jpg"
class="thumbnail img-responsive push-down-top" />
<section class="description">
<p class="h5">Five bedrooms, three full baths and 3,702 square feet of living space.</p>
<p>Extra-tall double-door entry opens to an inviting and spacious foyer. Formal living and dining rooms featuring see through fireplace.</p>
<p>Large gourmet kitchen with granite countertops, stainless steel appliances with double ovens. Arrow shaped center island, huge, walk in pantry and lots of cabinets for storage. Large eating area off the kitchen for the family to enjoy meals together.</p>
<p>The front bedroom with full bathroom just outside the door. Huge family room with recessed entertainment area complete with recessed lighting and ceiling fan. The huge master suite features a soaker tub, large shower, walk-in closet and an additional over-sized walk-in closet. The master bath features split sinks with granite countertops. 3 large, secondary bedrooms and large bathroom that is great for kids to share.</p>
<p>Also includes: 3 car garage, high ceilings throughout, wired for spa in backyard, dual pane windows, new tile and carpet on bottom floor and large, upstairs laundry room. Nicely landscaped backyard with the best views in the Temescal Valley.</p>
</section>
<h2 class="h4">Features</h2>
<ul>
<li class="feature">Luxurious sized master suite</li>
<li class="feature">Oversized walk-in closet</li>
<li class="feature">Frameless Beech cabinetry with concealed hinges</li>
<li class="feature">Elegant slab white quartz countertops with large backsplash</li>
<li class="feature">Dual china sinks with Moen faucets</li>
<li class="feature">Clear frameless shower enclosures</li>
</ul>
</div></code></pre>
</div>
<div role="tabpanel" class="tab-pane fade" id="css-tab">
<pre><code class="css hljs">/* none */</code></pre>
</div>
<div role="tabpanel" class="tab-pane fade" id="javascript-tab">
<div class="alert alert-info alert-dismissible console-message" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Tip:</strong> The browser is your development environment! Open the developer tools by pressing F12 and paste the code you see below into the console.
</div>
<div class="module-title"><a data-toggle="collapse" href="#getElementsByClassName" aria-expanded="false">getElementsByClassName</a></div>
<div class="collapse" id="getElementsByClassName">
<pre><code class="javascript hljs">document.getElementsByClassName('img-responsive')</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#querySelector" aria-expanded="false">querySelector</a></div>
<div class="collapse" id="querySelector">
<pre><code class="javascript hljs">document.querySelector('.img-responsive')
document.querySelector('#example-container li:first-child')</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#querySelectorAll" aria-expanded="false">querySelectorAll</a></div>
<div class="collapse" id="querySelectorAll">
<pre><code class="javascript hljs">document.querySelectorAll('.img-responsive')</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#querySelectorAll-element" aria-expanded="false">querySelectorAll (element)</a></div>
<div class="collapse" id="querySelectorAll-element">
<pre><code class="javascript hljs">var container = document.getElementById('example-container');
container.querySelectorAll('.img-responsive')</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#return-type" aria-expanded="false">Return Type</a></div>
<div class="collapse" id="return-type">
<pre><code class="javascript hljs">var items = document.querySelectorAll('#example-container li');
items.toString()</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#for-iteration" aria-expanded="false">for Iteration</a></div>
<div class="collapse" id="for-iteration">
<pre><code class="javascript hljs">var items = document.querySelectorAll('#example-container li');
for (var i = 0, len = items.length; i < len; i++) {
console.log(items[i].innerText);
}</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#foreach-iteration" aria-expanded="false">forEach Iteration</a></div>
<div class="collapse" id="foreach-iteration">
<pre><code class="javascript hljs">var forEach = Array.prototype.forEach;
var items = document.querySelectorAll('#example-container li');
forEach.call(items, function(item){
console.log(item.innerText);
});</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#live-result" aria-expanded="false">"Live" Result</a></div>
<div class="collapse" id="live-result">
<pre><code class="javascript hljs">var list = document.querySelector('#example-container ul');
var items = document.getElementsByClassName('feature');
console.log(items.length);
var newItem = document.createElement('LI');
newItem.className = 'feature';
newItem.innerText = 'new live feature';
list.appendChild(newItem);
console.log(items.length);</code></pre>
</div>
<div class="module-title"><a data-toggle="collapse" href="#static-result" aria-expanded="false">Static Result</a></div>
<div class="collapse" id="static-result">
<pre><code class="javascript hljs">var list = document.querySelector('#example-container ul');
var items = document.querySelectorAll('#example-container li');
console.log(items.length);
var newItem = document.createElement('LI');
newItem.className = 'feature';
newItem.innerText = 'new static feature';
list.appendChild(newItem);
console.log(items.length);</code></pre>
</div>
</div>
<!-- -------------------------------------------------------------------- -->
</div>
</div>
</div>
</div>
</article>
<footer>
<div class="container">
<div class="row push-down-top-lg hidden-xs">
<div class="col-xs-offset-2 col-xs-3">
<img src="img/html5-fundamentals.png" title="HTML5 Fundamentals" />
<p>by <a href="http://craigshoemaker.net">Craig Shoemaker</a></p>
<p class="lead"><a href="http://twitter.com/craigshoemaker">Craig Shoemaker</a> is a <a href="http://www.infragistics.com">developer</a>,
<a href="http://www.pluralsight.com/author/craig-shoemaker">instructor</a>, <a href="http://code-magazine.com/SearchResults.aspx?search=craig%20shoemaker">writer</a>, <a href="http://polymorphicpodcast.com">podcaster</a>, and a man of many hats at <a href="http://www.infragistics.com">Infragistics</a>.</p>
<div class="push-down-top-md">
<a href="https://www.pluralsight.com/courses/html5-fundamentals"><img src="img/pluralsight.png" title="HTML5 Fundamentals" /></a>
</div>
</div>
<div class="col-xs-offset-1 col-xs-3">
<a href="http://craigshoemaker.net"><img src="img/craig-shoemaker.png" class="img-responsive" title="Craig Shoemaker" /></a>
</div>
</div>
</div>
</footer>
</main>
</body>
</html>