Skip to content

Commit

Permalink
Improve compatibility with WordPress 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
madalingorbanescu committed Mar 3, 2021
1 parent 141c614 commit c4ccdea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ if (!Date.now)

/* ====== ON WINDOW LOAD ====== */

$window.load(function() {
$window.on('load', function() {
browserSize();
navigation.init();
fixedSidebars.update();
Expand Down Expand Up @@ -1902,6 +1902,7 @@ if (!Date.now)
svgLogo.update();
ticking = false;
}

/* ====== HELPER FUNCTIONS ====== */


Expand Down
4 changes: 2 additions & 2 deletions assets/js/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function init() {

/* ====== ON WINDOW LOAD ====== */

$window.load(function() {
$window.on('load', function() {
browserSize();
navigation.init();
fixedSidebars.update();
Expand Down Expand Up @@ -56,4 +56,4 @@ function update() {
fixedSidebars.update();
svgLogo.update();
ticking = false;
}
}
4 changes: 2 additions & 2 deletions inc/jetpack/responsive-videos/responsive-videos.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
* Load responsive_videos().
* Trigger resize to make sure responsive_videos() is loaded after IS.
*/
$( window ).load( responsive_videos ).resize( debounce( responsive_videos, 100 ) ).trigger( 'resize' );
$( window ).on('load', responsive_videos ).resize( debounce( responsive_videos, 100 ) ).trigger( 'resize' );
$( document ).on( 'post-load', responsive_videos );

} )( jQuery );
} )( jQuery );
2 changes: 1 addition & 1 deletion inc/jetpack/responsive-videos/responsive-videos.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c4ccdea

Please sign in to comment.