Skip to content

Commit

Permalink
Calculate height on load.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Sep 13, 2012
1 parent bb41d64 commit 0c3a0f9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions vendor/assets/javascripts/foundation/jquery.foundation.topbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
var $this = $(this),
$topbar = $this.closest('.top-bar');

if (methods.breakpoint()) {
if (!settings.initialized) {
methods.assemble($topbar);
settings.initialized = true;
}

if (!settings.initialized) {
methods.assemble($topbar);
settings.initialized = true;
}
if (!settings.height) {
methods.largestUL($topbar);
}

if (methods.breakpoint()) {
$topbar.toggleClass('expanded');
}
});
Expand All @@ -57,10 +60,6 @@
$section.css({'left': -(100 * settings.index) + '%'});
$section.find('>.name').css({'left': 100 * settings.index + '%'});

if (!settings.height) {
methods.largestUL($topbar);
}

$this.siblings('ul').height(settings.height + 40);
}
});
Expand Down

0 comments on commit 0c3a0f9

Please sign in to comment.