Skip to content
This repository has been archived by the owner on May 23, 2018. It is now read-only.

Commit

Permalink
JS functions: Replace the deprecated .load() method for the "load" …
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean90 committed Jan 16, 2016
1 parent 5f12250 commit bc49454
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function twentysixteen_scripts() {
wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20151104' );
}

wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20151204', true );
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160116', true );

wp_localize_script( 'twentysixteen-script', 'screenReaderText', array(
'expand' => __( 'expand child menu', 'twentysixteen' ),
Expand Down
2 changes: 1 addition & 1 deletion js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
newImg = new Image();
newImg.src = element.attr( 'src' );

$( newImg ).load( function() {
$( newImg ).on( 'load.twentysixteen', function() {
if ( newImg.width >= 840 ) {
element.addClass( 'below-entry-meta' );

Expand Down

0 comments on commit bc49454

Please sign in to comment.