Skip to content

Commit

Permalink
merged in PR #27 without changes to index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftbot committed Jul 6, 2012
1 parent 089f1a9 commit 498d5ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion less/pivot.less
Expand Up @@ -19,5 +19,5 @@ metro-pivot .headers {
.metro-pivot .headers { white-space: nowrap; display: block; clear: both; } .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 .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 .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%; } .metro-pivot .items .pivotItem { display: block; white-space: normal; text-align: justify; width: 100%; }
5 changes: 3 additions & 2 deletions scripts/jquery.metro.js
Expand Up @@ -118,7 +118,8 @@
}, },
setCurrentItem: function(item, index){ setCurrentItem: function(item, index){
var pivot = this; var pivot = this;

var currentHeight = pivot.items.height();
pivot.items.height(currentHeight);
// hide current item immediately // hide current item immediately
pivot.items.children(".pivotItem.current").hide().removeClass("current"); pivot.items.children(".pivotItem.current").hide().removeClass("current");


Expand All @@ -128,7 +129,7 @@
item.css({ marginLeft: item.outerWidth() }).show().addClass("current"); item.css({ marginLeft: item.outerWidth() }).show().addClass("current");


// animate it to left // 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); }, 200);
}, },
Expand Down

0 comments on commit 498d5ce

Please sign in to comment.