]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Use pull request #10729 from DanielRuf/patch-on-load for v6.5.0
authorDaniel Ruf <DanielRuf@users.noreply.github.com>
Sat, 16 Jun 2018 06:59:12 +0000 (08:59 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sat, 16 Jun 2018 06:59:12 +0000 (08:59 +0200)
4ad4a07a6 use on() to listen for the load event
de54ab2a5 use on() to listen for the load event

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
js/foundation.accordion.js
js/foundation.tabs.js

index 0d601aac3f53b9dbc5bf7db34684c4a0eab07525..ecd2b4eb8bc1b10e4c7c33ee9eb126bcf126fcbb 100644 (file)
@@ -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);
             });
index c6380d2b7d62be34aa08c6c7904bf55c807daf09..780da2d104db5222817d8ea51b89ab3355f064e0 100644 (file)
@@ -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();
           });