Changeset 24511
- Timestamp:
- 06/25/2013 09:09:00 PM (13 years ago)
- Location:
- trunk/wp-content/themes/twentythirteen
- Files:
-
- 2 edited
-
functions.php (modified) (1 diff)
-
js/functions.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentythirteen/functions.php
r24421 r24511 219 219 220 220 // Loads JavaScript file with functionality specific to Twenty Thirteen. 221 wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20130 423', true );221 wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20130625', true ); 222 222 223 223 // Loads our main stylesheet. -
trunk/wp-content/themes/twentythirteen/js/functions.js
r24391 r24511 6 6 7 7 ( function( $ ) { 8 var html = $( 'html' ), 9 body = $( 'body' ), 10 _window = $( window ), 11 adjustFooter, 8 var body = $( 'body' ), 9 _window = $( window ), 12 10 13 11 /** 14 * Adds a top margin to the footer if the sidebar widget area is 15 * higher than the rest of the page, to help the footer always16 * visually clearthe sidebar.12 * Adds a top margin to the footer if the sidebar widget area is higher 13 * than the rest of the page, to help the footer always visually clear 14 * the sidebar. 17 15 */ 18 adjustFooter = function() { 19 var sidebar = $( '#secondary .widget-area' ), 20 secondary = ( 0 == sidebar.length ) ? -40 : sidebar.height(), 21 margin = $( '#tertiary .widget-area' ).height() - $( '#content' ).height() - secondary; 16 $( function() { 17 if ( body.is( '.sidebar' ) ) { 18 var sidebar = $( '#secondary .widget-area' ), 19 secondary = ( 0 == sidebar.length ) ? -40 : sidebar.height(), 20 margin = $( '#tertiary .widget-area' ).height() - $( '#content' ).height() - secondary; 22 21 23 if ( margin > 0 && _window.innerWidth() > 999 ) 24 $( '#colophon' ).css( 'margin-top', margin + 'px' ); 25 }; 26 27 $( function() { 28 if ( body.is( '.sidebar' ) ) 29 adjustFooter(); 22 if ( margin > 0 && _window.innerWidth() > 999 ) 23 $( '#colophon' ).css( 'margin-top', margin + 'px' ); 24 } 30 25 } ); 31 26 … … 39 34 40 35 button = nav.find( '.menu-toggle' ); 41 menu = nav.find( '.nav-menu' );42 36 if ( ! button ) 43 37 return; 44 38 45 39 // Hide button if menu is missing or empty. 40 menu = nav.find( '.nav-menu' ); 46 41 if ( ! menu || ! menu.children().length ) { 47 42 button.hide();
Note: See TracChangeset
for help on using the changeset viewer.