diff --git wp-content/themes/twentyfifteen/js/functions.js wp-content/themes/twentyfifteen/js/functions.js
index 2da5cbc..75fa584 100644
|
|
|
8 | 8 | ( function( $ ) { |
9 | 9 | var $body, $window, $sidebar, adminbarOffset, top = false, |
10 | 10 | bottom = false, windowWidth, windowHeight, lastWindowPos = 0, |
11 | | topOffset = 0, bodyHeight, sidebarHeight, resizeTimer, |
| 11 | topOffset = 0, pageHeight, sidebarHeight, resizeTimer, |
12 | 12 | secondary, button; |
13 | 13 | |
14 | 14 | function initMainNavigation( container ) { |
… |
… |
|
113 | 113 | |
114 | 114 | sidebarHeight = $sidebar.height(); |
115 | 115 | windowHeight = $window.height(); |
116 | | bodyHeight = $body.height(); |
| 116 | pageHeight = $('#page').height(); |
117 | 117 | |
118 | 118 | if ( sidebarHeight + adminbarOffset > windowHeight ) { |
119 | 119 | if ( windowPos > lastWindowPos ) { |
… |
… |
|
121 | 121 | top = false; |
122 | 122 | topOffset = ( $sidebar.offset().top > 0 ) ? $sidebar.offset().top - adminbarOffset : 0; |
123 | 123 | $sidebar.attr( 'style', 'top: ' + topOffset + 'px;' ); |
124 | | } else if ( ! bottom && windowPos + windowHeight > sidebarHeight + $sidebar.offset().top && sidebarHeight + adminbarOffset < bodyHeight ) { |
| 124 | } else if ( ! bottom && windowPos + windowHeight > sidebarHeight + $sidebar.offset().top && sidebarHeight + adminbarOffset < pageHeight ) { |
125 | 125 | bottom = true; |
126 | 126 | $sidebar.attr( 'style', 'position: fixed; bottom: 0;' ); |
127 | 127 | } |