Skip to content

Commit

Permalink
breakpoint actually is necessary, creating a new element with the 'to…
Browse files Browse the repository at this point in the history
…p-bar-js-breakpoint' class that contains the width defined by the $topBarBreakPoint sass variable
  • Loading branch information
Mark Hayes committed Sep 18, 2012
1 parent 7137183 commit 23eb4ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scss/foundation/components/modules/_topbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- <li class="divider"> creates a divider between nav items, add margins for space
- <li class="search"> Needs to hold a <form> which can use .row.collapse and pre/postfix buttons or default type="search"
*/

.top-bar-js-breakpoint {width:$topBarBreakPoint !important; visibility:hidden;}
/* <nav> */
.top-bar { background: $topBarBgColor; height: $topBarHeight; line-height: $topBarHeight; margin: 0 0 $topBarBtmMargin; padding: 0; width: 100%;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

var settings = {
index : 0,
breakPoint : 767,
initialized : false
},
methods = {
Expand All @@ -23,7 +22,9 @@
settings.$w = $(window),
settings.$topbar = $('nav.top-bar');
settings.$titlebar = settings.$topbar.children('ul:first');
settings.breakPoint = settings.$topbar.data('breakpoint') || settings.breakPoint;
var breakpoint = $("<div class='top-bar-js-breakpoint'/>").appendTo("body");
settings.breakPoint = breakpoint.width();
breakpoint.remove();

if (!settings.initialized) {
methods.assemble();
Expand All @@ -40,6 +41,7 @@
if (methods.breakpoint()) {
settings.$topbar.toggleClass('expanded');
settings.$topbar.css('min-height', '');

}
});

Expand Down

0 comments on commit 23eb4ce

Please sign in to comment.