Scroll to a section on page load using JQuery | Js Tutorial | Animate

preview_player
Показать описание
In this tutorial, you will learn how to scroll to particular section when you load a page in jquery.

used jquery animation
used scrolltop for scrolling to top
used offset for getting the current position of element

Scroll to a section on page load using JQuery | Js Tutorial

jQuery("html").animate({
scrollTop:jQuery("#newsection").offset().top - 100;
});

#jquery #knowledgethrusters
Рекомендации по теме
Комментарии
Автор

Short and simple. Thank you very much.

galibjaman
join shbcf.ru