| 8 | | /** |
| 9 | | * Repositions the window on jump-to-anchor to account for |
| 10 | | * navbar height. |
| 11 | | */ |
| 12 | | var twentyThirteenAdjustAnchor = function() { |
| 13 | | if ( window.location.hash ) |
| 14 | | window.scrollBy( 0, -49 ); |
| | 8 | var twentyThirteen = { |
| | 9 | /** |
| | 10 | * Adds a margin to the footer, if the sidebar widget area is higher |
| | 11 | * than the rest of the page. |
| | 12 | */ |
| | 13 | adjustFooter : function() { |
| | 14 | var sidebar = $('#secondary .widget-area'), |
| | 15 | secondary = 0 == sidebar.length ? -40 : sidebar.height(), |
| | 16 | margin = $('#tertiary .widget-area').height() - $('#content').height() - secondary; |
| | 17 | |
| | 18 | if ( 0 < margin && 999 < window.innerWidth ) |
| | 19 | $( '#colophon' ).css( 'margin-top', margin + 'px' ); |
| | 20 | }, |
| | 21 | |
| | 22 | /** |
| | 23 | * Repositions the window on jump-to-anchor to account for navbar |
| | 24 | * height. |
| | 25 | */ |
| | 26 | adjustAnchor : function() { |
| | 27 | if ( window.location.hash ) |
| | 28 | window.scrollBy( 0, -49 ); |
| | 29 | } |