From: Shaun Simmons Date: Mon, 14 Nov 2016 16:29:45 +0000 (-0500) Subject: Clean up a few glaring code-style issues X-Git-Tag: v6.3-rc1~21^2~1^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9369%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Clean up a few glaring code-style issues --- diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index 6c73b2332..39ca0f7cc 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -69,8 +69,8 @@ class Tabs { 'aria-labelledby': linkId }); - if(isActive && _this.options.autoFocus){ - $(window).load(function() { + if(isActive && _this.options.autoFocus){ + $(window).load(function() { $('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, () => { $link.focus(); }); @@ -82,7 +82,7 @@ class Tabs { var anchor = window.location.hash; //need a hash and a relevant anchor in this tabset if(anchor.length) { - var $link =$elem.find('[href="'+anchor+'"]'); + var $link = $elem.find('[href="'+anchor+'"]'); if ($link.length) { _this.selectTab($(anchor)); @@ -155,8 +155,6 @@ class Tabs { */ _addKeyHandler() { var _this = this; - var $firstTab = _this.$element.find('li:first-of-type'); - var $lastTab = _this.$element.find('li:last-of-type'); this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function(e){ if (e.which === 9) return; @@ -252,8 +250,8 @@ class Tabs { */ this.$element.trigger('change.zf.tabs', [$target, $targetContent]); - //fire to children a mutation event - $targetContent.find("[data-mutate]").trigger("mutateme.zf.trigger"); + //fire to children a mutation event + $targetContent.find("[data-mutate]").trigger("mutateme.zf.trigger"); } /**