summaryrefslogtreecommitdiffstats
path: root/example/example.html
diff options
context:
space:
mode:
Diffstat (limited to 'example/example.html')
-rw-r--r--example/example.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/example/example.html b/example/example.html
index a948bf2..69a5c31 100644
--- a/example/example.html
+++ b/example/example.html
@@ -5,6 +5,7 @@
<title>jQuery Simple Equal Heights Example</title>
<style>
body { width: 960px; margin: 20px auto; }
+ pre { display: inline; }
.column1, .column2, .column3 { width: 250px; padding: 10px; margin: 0 20px 0 0; height: auto; float: left; color: #fff; }
.column1 { background: red; }
.column2 { background: blue; }
@@ -13,6 +14,11 @@
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
+ .row { display: block; margin: 20px 0;}
+ @media screen and (max-width: 960px) {
+ body { width: 90%; }
+ .column1, .column2, .column3 { width: calc(30% - 40px); }
+ }
</style>
</head>
<body>
@@ -59,10 +65,37 @@
</div>
</div>
+ <div data-equal="div" data-watch="true" id="equalwatch" class="clearfix">
+ <h3>Using equal heights with <pre>data-equal="div"</pre> und <pre>data-watch="true"</pre></h3>
+ <span class="row">
+ <button id="unwatch">Click here to unwatch</button>
+ <button id="reset-heights">Click here to reset heights</button>
+ <button id="watch">Click here to watch</button>
+ </span>
+ <div class="column1">
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ <div class="column2">
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
+ </div>
+ <div class="column3">
+ <p>Lorem ipsum dolor sit amet</p>
+ </div>
+ </div>
+
<script src="jquery-1.7.2.min.js"></script>
<script src="../jquery.equalheights.js"></script>
<script>
$('#equalheight div').equalHeights();
+ $('#unwatch').on('click', function () {
+ $('#equalwatch div').equalHeights({unwatch: true});
+ });
+ $('#reset-heights').on('click', function () {
+ $('#equalwatch div').removeAttr("style");
+ });
+ $('#watch').on('click', function () {
+ $('#equalwatch div').equalHeights({watch: true});
+ });
</script>
</body>