Skip to content

Instantly share code, notes, and snippets.

@vbasoon
Created June 7, 2020 08:44
Show Gist options
  • Save vbasoon/76ec3e5f6955371c698316511c5bb92d to your computer and use it in GitHub Desktop.
Save vbasoon/76ec3e5f6955371c698316511c5bb92d to your computer and use it in GitHub Desktop.
Ефект перелистування
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