Twenty Fourteen: load Masonry after window load event to give more time for widget content to load before drawing the layout. Closes #27051.
Built from https://develop.svn.wordpress.org/trunk@27627 git-svn-id: http://core.svn.wordpress.org/trunk@27470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d1f3abe55c
commit
a40a36e539
|
@ -256,7 +256,7 @@ function twentyfourteen_scripts() {
|
|||
) );
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131209', true );
|
||||
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140319', true );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
|
||||
|
||||
|
|
|
@ -103,21 +103,21 @@
|
|||
} );
|
||||
} );
|
||||
|
||||
// Arrange footer widgets vertically.
|
||||
if ( $.isFunction( $.fn.masonry ) ) {
|
||||
$( '#footer-sidebar' ).masonry( {
|
||||
itemSelector: '.widget',
|
||||
columnWidth: function( containerWidth ) {
|
||||
return containerWidth / 4;
|
||||
},
|
||||
gutterWidth: 0,
|
||||
isResizable: true,
|
||||
isRTL: $( 'body' ).is( '.rtl' )
|
||||
} );
|
||||
}
|
||||
|
||||
// Initialize Featured Content slider.
|
||||
_window.load( function() {
|
||||
// Arrange footer widgets vertically.
|
||||
if ( $.isFunction( $.fn.masonry ) ) {
|
||||
$( '#footer-sidebar' ).masonry( {
|
||||
itemSelector: '.widget',
|
||||
columnWidth: function( containerWidth ) {
|
||||
return containerWidth / 4;
|
||||
},
|
||||
gutterWidth: 0,
|
||||
isResizable: true,
|
||||
isRTL: $( 'body' ).is( '.rtl' )
|
||||
} );
|
||||
}
|
||||
|
||||
// Initialize Featured Content slider.
|
||||
if ( body.is( '.slider' ) ) {
|
||||
$( '.featured-content' ).featuredslider( {
|
||||
selector: '.featured-content-inner > article',
|
||||
|
|
Loading…
Reference in New Issue