javascript - Scroll without calling scroll event -
this web has layout:
section1 section2 section3 section4 section5
each section covers entire screen height. need web scroll middle (section3) while i'm preloading images, that, use:
var targetoffset = $('#home-nav-bar').offset().top - 183; $("html, body").animate({ scrolltop: targetoffset }, 100);
this effect not visible user, because trigger while preloader loads images.
but web uses parallax effect, i'm achieving stellar.js
. problem have .animate
fires scroll event on page, , triggers stellar code, moves elements away should after preloading finishes. there way can "scroll" section3 without using .animate triggers stellar.js
?
Comments
Post a Comment