@@ -195,7 +195,7 @@ <h2>Install packages seperately</h2>
195195 < p > Already have a CastleCSS project and want to add a module or just want to add 1 part of CastleCSS? Just include the core and any addon you want.</ p >
196196 < div class ="g ">
197197
198- < div id ="core " class ="b0_12 b5_12 ">
198+ < div id ="core " class ="b0_12 b5_12 eq ">
199199 < div class ="block block-invert p-3x pt-2x ">
200200 < h2 > Core</ h2 >
201201 < p >
@@ -230,7 +230,7 @@ <h3>What's included?</h3>
230230 </ p >
231231 </ div >
232232 </ div >
233- < div id ="buttons " class ="b0_12 b5_12 ">
233+ < div id ="buttons " class ="b0_12 b5_12 eq ">
234234 < div class ="block block-invert p-3x pt-2x ">
235235 < h2 > Buttons</ h2 >
236236 < p >
@@ -255,7 +255,7 @@ <h3>What's included?</h3>
255255 </ p >
256256 </ div >
257257 </ div >
258- < div id ="notifications " class ="b0_12 b5_12 ">
258+ < div id ="notifications " class ="b0_12 b5_12 eq ">
259259 < div class ="block block-invert p-3x pt-2x ">
260260 < h2 > Notifications</ h2 >
261261 < p >
@@ -279,7 +279,7 @@ <h3>What's included?</h3>
279279 </ p >
280280 </ div >
281281 </ div >
282- < div id ="icons " class ="b0_12 b5_12 ">
282+ < div id ="icons " class ="b0_12 b5_12 eq ">
283283 < div class ="block block-invert p-3x pt-2x ">
284284 < h2 > Icons</ h2 >
285285 < p >
@@ -317,26 +317,23 @@ <h3>What's included?</h3>
317317 $ ( function ( ) {
318318 navOpen ( ) ;
319319
320- // window.onscroll = function(e) {
321- // offSetManager();
322- // }
320+ window . onscroll = function ( e ) {
321+ offSetManager ( ) ;
322+ }
323323 } ) ;
324324
325325 function offSetManager ( ) {
326326
327327 var yOffset = 110 ;
328328 var currYOffSet = window . pageYOffset ;
329+ var menuHeight = $ ( '.doc-menu' ) . height ( ) ;
330+ var windowHeight = $ ( window ) . height ( ) ;
329331
330- if ( yOffset < currYOffSet ) {
332+ if ( ( yOffset < currYOffSet ) && ( menuHeight < windowHeight ) ) {
331333 $ ( '.nav-wrap' ) . addClass ( 'fixed' ) ;
334+ } else if ( yOffset > currYOffSet ) {
335+ $ ( '.nav-wrap' ) . removeClass ( 'fixed' ) ;
332336 }
333- else {
334-
335- if ( currYOffSet < yOffset ) {
336- $ ( '.nav-wrap' ) . removeClass ( 'fixed' ) ;
337- }
338- }
339-
340337 }
341338
342339 function navOpen ( ) {
0 commit comments