Fullpage.js disable on mobile/below given pixels?

删除回忆录丶 提交于 2019-12-24 02:22:05

问题


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>

回答1:


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.



来源:https://stackoverflow.com/questions/46868397/fullpage-js-disable-on-mobile-below-given-pixels

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!