Jump to content
Search Community

Mobile scrolling mobile huawei not working !

alessio test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

In the site there is a part of horizontal scrolling and when you get in the cabinet the scroll becomes vertical. The scroll does not work on huawei mobile phones. I do not know what the problem is. I put the code I used for the horizontal scroll

 

$(function(){

        var $window = $(window);		

        var scrollTime = 1.2;			
        var scrollDistance = 300;		

        $window.on("mousewheel DOMMouseScroll", function(event){

          event.preventDefault();

          var delta = event.originalEvent.wheelDelta/120 || -event.originalEvent.detail/3;
          var scrollLeft = $window.scrollLeft();
          var finalScroll = scrollLeft - parseInt(delta*scrollDistance);

          TweenMax.to($window, scrollTime, {
            scrollTo : { x: finalScroll, autoKill:true },
              ease: Power1.easeOut,	
              autoKill: true,
              overwrite: 5
            });
        });
      });

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...