C
C
Clay2020-05-14 09:20:53
JavaScript
Clay, 2020-05-14 09:20:53

Fullpage.js and Swiper scrolling on a website?

I am using fullpage js for scrolling on a website, I have 5 sections in total. On the second section (skills) swiper is implemented and also with horizontal scrolling on the mouse wheel.

direction: 'horizontal',
  slidesPerView: 3, 
  slidesPerGroup: 3, 
  sensitivity: 1,   
  spaceBetween: 100,
  mousewheel: {
     invert: false,
     releaseOnEdges:true,
  }, //колесика мыши 
  autoHeight: true,
  roundLengths: true,

normalScrollElements in fullpage js prevents scrolling on the skills section and everything would be fine, but there is one BUT. When the slider reaches the last item, you need to scroll the wheel with more force to move to the next section than on normal fullpage sections. So how do you implement fluidity between a section and a slider? fullpage.js
scrollOverflow: false, 
  v2compatible: false, 
  scrollBar: true, 
  paddingTop: 10, 
  // normalScrollElements:'.skills', 
  on:{
     reachEnd: function () {
         setTimeout(function () {
             $.fn.fullpage.setAllowScrolling(true);
         },1000)
     }
  },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sashabeep, 2020-05-14
@sashabeep

Consider switching to Swiper entirely.
Otherwise, you will suffer with threshholds
timeout, for example, set not 1000, but, say, 50. But in general, it’s better to write a custom function for scrolling inside the last slide

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question