Created
July 9, 2019 07:36
-
-
Save paveltretyakovru/533ecb38986cff01d22f34e40d6b4fa8 to your computer and use it in GitHub Desktop.
Проверить существует ли прокрутка сайта, если да, то прокрутить страницу до элемента
This file contains hidden or 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
if ($(document).height() > $(window).height()) { | |
$([document.documentElement, document.body]).animate({ | |
scrollTop: $("#certificate-info h2").offset().top | |
}, 2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment