lukehaas / Scrollify

A jQuery plugin that assists scrolling and snaps to sections.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scroll not working in mobile(google chrome & firefox)

pwketankulkarni opened this issue · comments

hi @lukehaas thanks for the wonderful plugin, I have used this plugin in one of my website in webflow its working fine, I have disabled the plugin for mobile but when i open it in mobile browser in some devices it is not working. Page is not scrolling at all in this resolution 360 * 780, but working in 393 * 851
here is my code

<script src="https://cdnjs.cloudflare.com/ajax/libs/scrollify/1.0.19/jquery.scrollify.min.js" integrity="sha256-RGlAwHKG24hsj1109SGQgvR+Orx7u8c6zyYH4Tk3ydU=" crossorigin="anonymous"></script> 
 
 <script>
if ($(window).width() > 768) {
 var openmodal={};
 function handleActiveLinks(activeNav){
    $(".clients").css("opacity",activeNav==="clients"?"100%":"80%");
    $(".services").css("opacity",activeNav==="services"?"100%":"80%");
    $(".work").css("opacity",activeNav==="workNav"?"100%":"80%");
    $(".aboutus").css("opacity",activeNav==="aboutus"?"100%":"80%");
    $(".partners").css("opacity",activeNav==="partners"?"100%":"80%");
    $(".contact").css("opacity",activeNav==="contact"?"100%":"80%");
 }
 
 $(function() {
         var newb="";
          $.scrollify({
            section : ".panel",
            scrollbars : false,
            scrollSpeed: 1400,
            afterResize:function(){
            		$.scrollify.move('#'+newb);
            },
            before:function(b){
            if(openmodal.modal && openmodal.modal.length>0){closemodal();}
            newb=b+1;
            switch(newb){
                 case 2:
           	         handleActiveLinks("clients");
                          break;
            case 3:
           		handleActiveLinks("services");
           		break;
            case 4:
           		handleActiveLinks("workNav");
           		break;
            case 5:
           		handleActiveLinks("aboutus");
           		break;
            case 6:
           		handleActiveLinks("partners");
         		  break;
            case 7:
           		handleActiveLinks("contact");
          		 break;
            default:handleActiveLinks("");
            }
           }
          });
      });
 </script>

this particular behaviour is only in google chrome and firefox