Event scroll I run the chip to the unit,holmhill.by how to get rid of start to scroll when scrole?

0 like 0 dislike
5 views
spoiler
$(window).scroll(function (event) { var st = $(this).scrollTop(); // down if (st > scrollPos && window_width >= 1024) { // if we are in the first section if (st < main_height && !flag) { // move to the second section flag = 1; $page.animate({ scrollTop: ($('section.about').offset().top) + 10 }, 3000, function () { if (window_width >= 1200) { $('section.about .video').css({ 'width': '893px' , 'height': '506px' }).addClass('opened'); //player.play(); // the startup videos as doscroll } flag = 0; console.log('.'); }); // animation of clouds, mountains, etc $('.clouds-front').css('top', '-295px'); $('.clouds-back').css('top', '-273px'); $('.clouds-front2').css('top', '95px'); $('.clouds-back2').css('top', '73px'); $('.mountain').css('top', '400px'); $('.logo').css('top', '500px'); } // up // if we are in the second section, we move to the top of the page } else if ((st <= main_height) && !flag && window_width >= 1024) { flag = 1; $page.animate({ scrollTop: 0 }, duration, function () { flag = 0; }); // animation of clouds, mountains, etc $('.clouds-front').css('top', '195px'); $('.clouds-back').css('top', '273px'); $('.clouds-front2').css('top', '295px'); $('.clouds-back2').css('top', '373px'); $('.mountain').css('top', '324px'); $('.logo').css('top', '135px'); } scrollPos = st; });
by | 5 views

1 Answer

0 like 0 dislike
in codepen it all
by

Related questions

0 like 0 dislike
2 answers
asked May 1, 2019 by parnasmi
0 like 0 dislike
2 answers
asked Apr 9, 2019 by Ingernirated
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,652 users