Skip to content

Commit

Permalink
bugfix in saTabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz committed Feb 23, 2018
1 parent 9beb822 commit ee5ce91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scrollimate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Scrollimate 1.6.1
/* Scrollimate 1.6.2
*
* written by Moritz Zimmer, 2016 – 2018
* http://www.moritzzimmer.com
Expand Down Expand Up @@ -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);
});
Expand Down

0 comments on commit ee5ce91

Please sign in to comment.