Fullpage.js: Set scrollOverflow class to only apply on certain sections?

Created on 5 Aug 2016  路  9Comments  路  Source: alvarotrigo/fullPage.js

Hi!

I wonder if it's possible to set the scrollOverflow to only apply on a certain element/section using a class? To make a long story short.

If content is larger than viewport scrollOverflow is activated
Even if content is larger than viewport scrollOverflow will be disabled
documentation fixed on dev

Most helpful comment

@meceware that's right! +1 for you! As fp-noscroll is not yet documented!
I'll mark the topic as a document enhancement!

<div class="section fp-noscroll"></div>

You can apply it to slides too.

All 9 comments

I think Alvaro might give a better answer but you can add fp-noscroll class to the sections to disable scrollbars on certain sections.

@meceware that's right! +1 for you! As fp-noscroll is not yet documented!
I'll mark the topic as a document enhancement!

<div class="section fp-noscroll"></div>

You can apply it to slides too.

Thanks for the respons!

I've added the fp-noscroll class to my start section but still get a scroll on the section.

<section class="start section fp-noscroll"> <img src="image.jpg" style="height:4000px"> </div>

scrollOverflow: true, scrollOverflowOptions: { scrollbars: true, mouseWheel: true, hideScrollbars: false, fadeScrollbars: false, disableMouse: true },

@Bondra sorry can't help more without an isolated reproduction in jsfiddle or codepen. Please provide one if you believe its a fullpage.js bug.

Working as expected as you can see here

That's true! With this I got a question regarding the behavior. Instead of scrolling through all content that exists in the section rapidly, is it possible to scroll the section just like a normal fullheight section?

That has nothing to do with fullpage.js. Use CSS absolute positioning for that .

Okey! I know why I don't got it to work in the first place though. I had multiple slides within the section. It didn't seem to work combined with the fp-scroll.

<div class="section fp-scroll"> <div class="slide"> <img src="image.jpg" style="height:4000px"> </div> <div class="slide"><img src="image.jpg" style="height:4000px"> </div> </div>

Added to the docs.

Was this page helpful?
0 / 5 - 0 ratings