Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merged in PR #27 without changes to index.html

  • Loading branch information...
commit 498d5cea6d046555ffd596e5d2b4ba3c26cd6b29 1 parent 089f1a9
@shiftkey shiftkey authored
Showing with 4 additions and 3 deletions.
  1. +1 −1  less/pivot.less
  2. +3 −2 scripts/jquery.metro.js
View
2  less/pivot.less
@@ -19,5 +19,5 @@ metro-pivot .headers {
.metro-pivot .headers { white-space: nowrap; display: block; clear: both; }
.metro-pivot .pivot-item h3, .metro-pivot .headers .header { #headingstyles; font-size: @h2fontSize; display: inline-block; vertical-align: top; padding: 0; cursor: pointer; margin-right:24px; }
.metro-pivot .headers .header.current { }
-.metro-pivot .items { position: relative; }
+.metro-pivot .items { position: relative; overflow: hidden; }
.metro-pivot .items .pivotItem { display: block; white-space: normal; text-align: justify; width: 100%; }
View
5 scripts/jquery.metro.js
@@ -118,7 +118,8 @@
},
setCurrentItem: function(item, index){
var pivot = this;
-
+ var currentHeight = pivot.items.height();
+ pivot.items.height(currentHeight);
// hide current item immediately
pivot.items.children(".pivotItem.current").hide().removeClass("current");
@@ -128,7 +129,7 @@
item.css({ marginLeft: item.outerWidth() }).show().addClass("current");
// animate it to left
- item.animate( { marginLeft: 0 }, pivot.animationDuration, function() { pivot.currentItemChanged(index);});
+ item.animate( { marginLeft: 0 }, pivot.animationDuration, function() {pivot.items.height('auto'); pivot.currentItemChanged(index);});
}, 200);
},
Please sign in to comment.
Something went wrong with that request. Please try again.