mardi 12 juin 2018

Can i disable fullPage.js if depending on div size?

Sorry if this is stupid question, but i'm not the greatest coder alive (actually i design websites for a living).

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, but i don't think i know how to tweak it right, or if it's even possible:

if(.scrollable.width < 480) { $('#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.

Is this possible? Much thanks in advance.

Aucun commentaire:

Enregistrer un commentaire