diff --git a/README.md b/README.md index 03f886d..66a4166 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ This advanced usage is for dynamic instances where equalize is ran after element Equalize the .parent's child element. See @larsbo's example.
$('.parent').equalize({children: 'p'}); // equalize height of paragraphs within .parent
+By setting clear to true the height/width will be removed.
+$('.parent').equalize({clear: true}); // default to clear height
+$('.parent').equalize({equalize: 'width', clear: true}); // clear width
## Examples
diff --git a/css/style.css b/css/style.css
index 04b5226..11ee30c 100644
--- a/css/style.css
+++ b/css/style.css
@@ -76,7 +76,7 @@ td { vertical-align: top; }
/* =========================================================================
- Primary Styles
+ Primary Styles
========================================================================== */
body { color: #333; padding-bottom: 3em; }
@@ -138,6 +138,7 @@ pre {
}
#advanced-example div,
+#clear-example div,
#height-example div { width: 60px; }
/* #width-example div { } */
@@ -174,7 +175,7 @@ pre {
/* =============================================================================
Print Styles
========================================================================== * /
-
+
@media print {
* { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s * /
a, a:visited { text-decoration: underline; }
diff --git a/index.html b/index.html
index 37497b0..172dfbf 100644
--- a/index.html
+++ b/index.html
@@ -46,6 +46,10 @@ Equalize the .parent's child element. See @larsbo's example.
$('.parent').equalize({children: 'p'}); // equalize height of paragraphs within .parent
+ By setting clear to true the height/width will be removed.
+$('.parent').equalize({clear: true}); // default to clear height
+$('.parent').equalize({equalize: 'width', clear: true}); // clear width
+
$('#height-example').equalize(); // defaults to height
@@ -75,7 +79,7 @@ $('#height-example').equalize({reset: true});
+ $('#advanced-example').equalize({reset: true});
Below the tallest div has a height of 200px, this will be removed before determining the max height, otherwise all elements would have a height of 200px.
$('#clear-example').equalize({reset: true});
+ Below the tallest div has a height of 200px, this will be cleared.
+ +