Created
June 7, 2020 08:44
-
-
Save vbasoon/76ec3e5f6955371c698316511c5bb92d to your computer and use it in GitHub Desktop.
Ефект перелистування
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
jQuery(document).ready(function($) { | |
$('nav').on('click', function() { | |
if ($(this).hasClass('down')) { | |
var movePos = $(window).scrollTop() + $(window).height(); | |
} | |
if ($(this).hasClass('top')) { | |
var movePos = $(window).scrollTop() - $(window).height(); | |
} | |
$('html, body').animate({ | |
scrollTop: movePos}, 600); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment