Fullpage.js disable on mobile/below given pixels?

Issue

https://alvarotrigo.com/fullPage/

I’ve tried code like this but that doesn’t work sadly. I want to disable it after 976px for mobile users.

<script>
if (screen && screen.width > 768) {
document.write('<script type="text/javascript" src="http://your-file-path/fullpage.js"><\/script>');
}
</script>

Solution

Just use the responsiveWidth or responsiveHeight option combined with fp-auto-height-responsive.

Read more about all of those options in the fullPage.js docs or see this codepen.

Answered By – Alvaro

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published