From: Daniel Ruf Date: Sat, 16 Jun 2018 06:59:12 +0000 (+0200) Subject: Use pull request #10729 from DanielRuf/patch-on-load for v6.5.0 X-Git-Tag: v6.5.0-rc.1^2~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=131fa96cde258b01e779a716cd0f4cf4acf65761;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Use pull request #10729 from DanielRuf/patch-on-load for v6.5.0 4ad4a07a6 use on() to listen for the load event de54ab2a5 use on() to listen for the load event Signed-off-by: Nicolas Coden --- diff --git a/js/foundation.accordion.js b/js/foundation.accordion.js index 0d601aac3..ecd2b4eb8 100644 --- a/js/foundation.accordion.js +++ b/js/foundation.accordion.js @@ -82,7 +82,7 @@ class Accordion extends Plugin { //roll up a little to show the titles if (this.options.deepLinkSmudge) { var _this = this; - $(window).load(function() { + $(window).on('load', function() { var offset = _this.$element.offset(); $('html, body').animate({ scrollTop: offset.top }, _this.options.deepLinkSmudgeDelay); }); diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index c6380d2b7..780da2d10 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -77,7 +77,7 @@ class Tabs extends Plugin { } if(isActive && _this.options.autoFocus){ - $(window).load(function() { + $(window).on('load', function() { $('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, () => { $link.focus(); });