summaryrefslogtreecommitdiffstats
path: root/example/example.html
diff options
context:
space:
mode:
authorMatt Banks <mjbanks@gmail.com>2015-12-02 08:35:51 -0500
committerMatt Banks <mjbanks@gmail.com>2015-12-02 08:35:51 -0500
commit02c20fb28f9bd896d222a807e10d320e7c738a4a (patch)
treef64de3a1a602e59f9edac2aee696c7e98eb3a577 /example/example.html
parent69d5afef56d42f30eb4804e9e8dd0a213b61f56c (diff)
parent4f9081986061f5c3eed29a620f0ce3fd0600cd02 (diff)
downloadjQuery.equalHeights-02c20fb28f9bd896d222a807e10d320e7c738a4a.zip
jQuery.equalHeights-02c20fb28f9bd896d222a807e10d320e7c738a4a.tar.gz
jQuery.equalHeights-02c20fb28f9bd896d222a807e10d320e7c738a4a.tar.bz2
Merge pull request #15 from osartun/master
Adding `watch` option among other things
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..c812921 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: 20%; 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>