-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathfills2.html
70 lines (63 loc) · 1.69 KB
/
fills2.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>filler</title>
<style>
.container {
width: 320px;
height: 320px;
border: 1px dashed blue;
margin: 20px;
}
.header {
width: 320px;
height: 60px;
background-color: green;
}
.content {
background-color: red;
}
#containerV,
#containerH {
float: left;
}
#contentH {
height: 320px;
}
</style>
</head>
<body>
<div id="filler_tests">
<div id="containerV" class="container">
<button name="adjustHeight">Adjust Height</button>
<div id="headerV" class="header"></div>
<div id="contentV" class="content"></div>
</div>
<div id="containerH" class="container">
<button name="adjustWidth">Adjust Width</button>
<div id="contentH" class="content"></div>
</div>
</div>
<script type='text/javascript'
src='../../../steal/steal.js'>
</script>
<script type='text/javascript'>
steal('jquery/dom/fills').then(function($){
$("button[name=adjustWidth]").click(function(ev) {
var w = $("#containerH").width();
w == 320 ? $("#containerH").width(480) : $("#containerH").width(320);
$("#containerH").trigger("resize");
});
$("button[name=adjustHeight]").click(function(ev) {
var h = $("#containerV").height();
h == 320 ? $("#containerV").height(480) : $("#containerV").height(320);
$("#containerV").trigger("resize");
});
$("#contentV").fills();
$("#contentH").fills( { width: true } );
$("#containerH").trigger("resize");
})
</script>
</body>
</html>