jqueryscrollscroll-snap-points

scrollSnap js resistance with mousewheel


I'm using https://github.com/electerious/scrollSnap to snapping sections in my website but i'm not understand because there is a resistance between mosaic grid and section below when i use mousewheel.

If i use scrollbar i can snap between sections under mosaic.

<script>
  scrollSnap.init({
    elements: document.querySelectorAll('section'),
    minWidth: 600,
    minHeight: 400,
    detectMobile: true,
    keyboard: true,
    duration: 20,
    timing: scrollSnap._timing
  })
  </script>

Solution

  • because you "snap" it to <section>, and your "upper html" is <div>. Wrap all your sections you want to be "snapable" inside of <section></section>.