Created
November 24, 2016 08:52
-
-
Save cagriuckan/d2c853e50e2514871fd2269acfa43389 to your computer and use it in GitHub Desktop.
Social Media Share Bar With jQuery by uckannet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lastScrollTop = 0; | |
$(window).scroll(function(event){ | |
var st = $(this).scrollTop(); | |
if (st > lastScrollTop){ | |
// downscroll code | |
$('.so-sticky-share').addClass('so-classname'); | |
} else { | |
// upscroll code | |
$('.so-sticky-share').removeClass('so-classname'); | |
} | |
lastScrollTop = st; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment