Disable Custom Script on Mobile

Hi Webflow forum dwellers,

I am trying to disable the scrollify script on mobile devices but can not seem to get the right syntax in the code. If anyone could help me disable this script on viewports below 767 px that would be much appreciated!

Here is the script inside the page:

<script src="https://cdnjs.cloudflare.com/ajax/libs/scrollify/1.0.21/jquery.scrollify.min.js" integrity="sha512-UyX8JsMsNRW1cYl8BoxpcamonpwU2y7mSTsN0Z52plp7oKo1u92Xqfpv6lOlTyH3yiMXK+gU1jw0DVCsPTfKew==" crossorigin="anonymous"></script>

<script>
  $(function() {
    $.scrollify({
      section : ".s-scroll",
    });
  });
</script>

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

I have the same question. Also using Scrollify.js script.
Can anyone help? :cold_face:

Hey Webflow Forum,

Iā€™m in the same boat as Alex and Yunfan. Does anyone know how to disable the above script on mobile (landscape and portrait)?

Thanks!

@AlexStein @co-sine et al

This is what worked for me. Paste into Before </body> tag :

<script src="https://cdnjs.cloudflare.com/ajax/libs/scrollify/1.0.21/jquery.scrollify.min.js" integrity="sha512-UyX8JsMsNRW1cYl8BoxpcamonpwU2y7mSTsN0Z52plp7oKo1u92Xqfpv6lOlTyH3yiMXK+gU1jw0DVCsPTfKew==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script>

if(!(/Android|webOS|BlackBerry|iPhone|iPod|iPad|Opera Mini|IEMobile/i.test(navigator.userAgent) )) {
        
        $.scrollify.update()
        
        $(function() {
          $.scrollify({
            section : ".section",
            interstitialSection : ".footer",
            
            scrollbars: true,
 		standardScrollElements: ".footer",
            scrollSpeed: 1100,
            easing: "easeOutExpo",
 						
            
          });
          
        
        });
        
        }
</script>

You need to make sure to replace your section and footer class names in this part (leave the period) :
section : ā€œ.sectionā€,
interstitialSection : ā€œ.footerā€,

interstitialSection is for section that is not 100vh (typically your footer)

1 Like

Thank you so much!!!