From: akodde Date: Tue, 10 Feb 2015 08:03:56 +0000 (+0100) Subject: Change init order to fix deeptab deeplink TypeError X-Git-Tag: v5.5.2~128^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6278%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Change init order to fix deeptab deeplink TypeError --- diff --git a/js/foundation/foundation.tab.js b/js/foundation/foundation.tab.js index 24e779a28..ea15e85ae 100644 --- a/js/foundation/foundation.tab.js +++ b/js/foundation/foundation.tab.js @@ -20,20 +20,19 @@ var self = this, S = this.S; - this.bindings(method, options); + // Store the default active tabs which will be referenced when the + // location hash is absent, as in the case of navigating the tabs and + // returning to the first viewing via the browser Back button. + S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () { + self.default_tab_hashes.push(this.hash); + }); // store the initial href, which is used to allow correct behaviour of the // browser back button when deep linking is turned on. self.entry_location = window.location.href; + this.bindings(method, options); this.handle_location_hash_change(); - - // Store the default active tabs which will be referenced when the - // location hash is absent, as in the case of navigating the tabs and - // returning to the first viewing via the browser Back button. - S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () { - self.default_tab_hashes.push(this.hash); - }); }, events : function () {