javascripthtmlcssresponsivefullpage.js

Fullpage.js disable on mobile/below given pixels?


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.