]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Clean up a few glaring code-style issues 9369/head
authorShaun Simmons <simshaun@gmail.com>
Mon, 14 Nov 2016 16:29:45 +0000 (11:29 -0500)
committerShaun Simmons <simshaun@gmail.com>
Mon, 14 Nov 2016 16:31:14 +0000 (11:31 -0500)
js/foundation.tabs.js

index 6c73b23327cd9265d18de4617e1e65718f097f67..39ca0f7cc53b40fad6783b84b352f8331ee33c8f 100644 (file)
@@ -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");
   }
 
   /**