-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathparent-flex-direction.html
63 lines (63 loc) · 2.32 KB
/
parent-flex-direction.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
<!doctype html>
<html class="no-js" lang="">
<head>
<title>Ridiculously Easy Layouts with Flexbox</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic|Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/css/normalize.css/normalize.css">
<link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="assets/css/examples.css">
<link rel="stylesheet" href="assets/css/flexbox.css">
<script type="text/javascript" src="assets/js/jquery/jquery.js"></script>
</head>
<body>
<header></header>
<main>
<article>
<nav></nav>
<section>
<h2>Parent - Flex Direction</h2>
<div class="controls">
<div>
<span id="row-button">row</span>
<span id="row-reverse-button">row-reverse</span>
<span id="column-button">column</span>
<span id="column-reverse-button">column-reverse</span>
</div>
</div>
<div class="example">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
</section>
</article>
</main>
<footer></footer>
<script type="text/javascript">
$(document).ready(function( ){
$('#row-button').on('click',function(){
$('.example').css('flex-direction','row')
});
$('#row-reverse-button').on('click',function(){
$('.example').css('flex-direction','row-reverse')
});
$('#column-button').on('click',function(){
$('.example').css('flex-direction','column')
});
$('#column-reverse-button').on('click',function(){
$('.example').css('flex-direction','column-reverse')
});
});
</script>
<script src="assets/js/examples.js"></script>
</body>
</html>
<!-- Stay out of divland - allows us to be semantic (but we still use divs as containers or specialized containers) -->
<!-- Divs are now just for additional formatting not pertaining to content -->
<!-- Div - generic container -->