Scrolling on touch devices

Author: AnselmvCreated Jan 28, 2014Updated May 21, 2019

There seems to be a problem when using the plugin on ipad. It scrolls multiple sections at a time. Well i think i might have found the source of this problem.

This code:

el.swipeEvents().bind("swipeDown",  function(event){ 
  if (!$("body").hasClass("disabled-onepage-scroll") && !$("body").hasClass("scrolling")){ event.preventDefault();
  el.moveUp();}
}).bind("swipeUp", function(event){ 
  if (!$("body").hasClass("disabled-onepage-scroll")&& !$("body").hasClass("scrolling")){ event.preventDefault();

  el.moveDown(); }
});

is written twice. So when swiping it gets executed multiple times.

once in this function: function init_scroll ()

and once in this function: function responsive()

removing the code from function responsive() solves the problem.

this is my first bug report/ fix on git so if something is not clear please tell me ;-)

Source: peachananr/onepage-scroll