Streaming live at 10am (PST)

Can i disable fullPage.js depending on div size?


#1

My question is: Can i disable fullPage.js depending on a div size?

I’ve been trying to look this up, but with no luck. I found this “if, else” stuff, but i don’t think i know how to tweak it right, or if it’s even possible:

if(.scrollable.width < 10) { 
   $('#fullpage').fullpage({
        autoScrolling: false,
        fitToSection: false
}} else {
   $('#fullpage').fullpage({
        autoScrolling: true,
        fitToSection: true
}}

.scrollable = div starting at 0vw and expanding to 50vw.
I want the scroll from fullPage.js to stop when this div is bigger than 1vw (or just 10 px) and active again when 0vw.

Is this possible?

Regards,
A javascript rookie


#2

Figured out another solution. :smile: