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
// In order to use this script add the class '.scroll-item' to the item you wish to scroll to. | |
// You'll need to choose elTop, elCenter, or elBottom depending on where you want to scroll in relation to the item's position. | |
// Feel free to modify this gist and improve upon it. | |
$(document).ready(function() { | |
"use strict"; | |
var windowHeight = $(window).height(), | |
scrollAmount = 0, | |
scrollDuration = 0, |