forked from ecarlisle/Easy-Layouts-with-Flexbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchild-order.html
48 lines (48 loc) · 1.56 KB
/
child-order.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
<!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>Child - Order</h2>
<div class="controls">
<span id="randomize-button">Randomize Order</span>
</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>
$(document).ready(function(){
$('#randomize-button').on('click',function(){
$('.example div').each(function(){
$(this).css('order', Math.floor(Math.random() * 5));
});
});
});
</script>
<script src="assets/js/examples.js"></script>
</body>
</html>