From ee5ce91bbc42f8e73ca2437148de8aacfc967cf1 Mon Sep 17 00:00:00 2001 From: Moritz Date: Fri, 23 Feb 2018 11:13:27 -0600 Subject: [PATCH] bugfix in saTabs --- scrollimate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrollimate.js b/scrollimate.js index e5708a2..1885ca8 100644 --- a/scrollimate.js +++ b/scrollimate.js @@ -1,4 +1,4 @@ -/* Scrollimate 1.6.1 +/* Scrollimate 1.6.2 * * written by Moritz Zimmer, 2016 – 2018 * http://www.moritzzimmer.com @@ -256,19 +256,19 @@ var scrollimate = (function( window, $ ){ var _saTabsSetUpPage = function() { $tabscrollAnchors = $("[data-tabscrollnavcontainer]").find("a").not("[data-saexclude]"); $transition_type = $("[data-tabscrollnavcontainer]").attr("data-tabscrollnavcontainer"); - $($tabscrollAnchors[0]).addClass("tabscroll_activeNavi"); + $($tabscrollAnchors[0]).parent().addClass("tabscroll_activeNavi"); for ($i = 0; $i < $tabscrollAnchors.length; $i++){ var $curEl = $($tabscrollAnchors[$i]), eachAnchor = $curEl.attr("href"); - $curEl.attr("data-tabscrollnavi", eachAnchor.substring(1)); + $curEl.parent().attr("data-tabscrollnavi", eachAnchor.substring(1)); $(eachAnchor).attr("data-tabscroll", eachAnchor.substring(1)); // removes link if in non-indexable version (to not interfere with app status keeping) if(!_global.indexable){ $curEl.removeAttr("href").css('cursor', 'pointer'); $curEl.on('click', function(){ - var tab_target = $(this).parent().attr("data-tabscrollnavi"); // TODO ... need to verify this does not break + var tab_target = $(this).parent().attr("data-tabscrollnavi"); // console.log( tab_target ); _saTabsHashChangeFunct(tab_target); });