]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
use on() to listen for the load event 10729/head
authorDaniel Ruf <DanielRuf@users.noreply.github.com>
Mon, 16 Oct 2017 10:43:12 +0000 (12:43 +0200)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2017 10:43:12 +0000 (12:43 +0200)
js/foundation.tabs.js

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();
           });