Marin Bajic
Marin Bajic

Reputation: 31

Scrollify - Block mouse scroll when animation going

I'm using scrollify on my web page and I have a problem when scrolling from one section to another. It all works fine with Firefox, but Chrome and other browsers are causing problems. 1 scroll moves to another section, but when I scroll 2 or more times while animation going, it makes a glitch effect. What I want to make is when animation is triggered to stop mousescroll until animation is over.

Scrollify - https://projects.lukehaas.me/scrollify/#home

My settings -

if( window.innerWidth > 1000 ) {
jQuery(document).ready(function($){
 $.scrollify({
  section : ".section-full-width",
  interstitialSection: "",
  easing: "easeOutExpo",
  scrollSpeed: 900,
  offset : 1,
  scrollbars: true,
  standardScrollElements: "",
  setHeights: true,
  overflowScroll: true,
  updateHash: true,
  touchScroll:true,
  });
});
};

Upvotes: 0

Views: 616

Answers (1)

TheShah
TheShah

Reputation: 61

Maybe this Issue helps solving your Problem: https://github.com/lukehaas/Scrollify/issues/405

here they talk about the following solutions:

1.Update to the latest version 1.0.21

or

2.add after line 270:

wheelHandler: function (e) {
// added
e.preventDefault();
...
}

or

3.change line 307:

if (locked) {
    e.preventDefault();
    return false;
}

Upvotes: 0

Related Questions