From b95bd42a85743d9ba8bdd784a99ba6256b7388b3 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 16 Aug 2017 14:47:23 -0500 Subject: [PATCH] added provision to be able to exclude links from saTabs --- scrollimate.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scrollimate.js b/scrollimate.js index 7019b85..f9ab6e9 100644 --- a/scrollimate.js +++ b/scrollimate.js @@ -208,7 +208,7 @@ var scrollimate = (function( window, $ ){ function setUpPage() { // finds all anchor tabs within the data-tabscrollnavcontainer - $tabscroll_anchors = $("[data-tabscrollnavcontainer]").find("a"); + $tabscroll_anchors = $("[data-tabscrollnavcontainer]").find("a").not("[data-saexclude]"); // if we pass a type in here, we can control the method of change. Right now we can do fade, slide and none. $transition_type = $("[data-tabscrollnavcontainer]").attr("data-tabscrollnavcontainer"); @@ -362,6 +362,7 @@ var scrollimate = (function( window, $ ){ _executeFunctionByName("scrollimate."+input[i]+""); } + /* Theoretical Example of debouncing, does not work that well */ // $('[data-sabglayer]').css('transition', 'all 0.075s'); var __debouncedParallax = _debounce(function() { @@ -369,6 +370,7 @@ var scrollimate = (function( window, $ ){ }, 5); /* End Debounce */ + // Code that initiates the window scroll listener, and all code (parallax or otherwise) that goes with it. // when the window is scrolled $(window).scroll( function(){ @@ -398,6 +400,8 @@ var scrollimate = (function( window, $ ){ }; + + /* * Public Methods */