2017-04-21 1 views
0

맥북 망막 디스플레이에서 메뉴 바 및 이미지 배너 애니메이션이 작동하지 않는다. 그러나 망막이없는 정상적인 디스플레이에서 작동합니다. 나는 트리거 콘솔을 추가했지만 스크롤 할 때 아무 것도 표시하지 않습니다. 여기맥북에서 망막 스크롤 애니메이션이 작동하지 않는다

http://sarichem.com/html 코드입니다 :

$(window).ready(function() { 

    var pageWidth = $(window).width(); 

    if (pageWidth > 1281) { 
    $(window).on('scroll',function() { 
     var amount = $(window).scrollTop(); 
     var amount2 = 1-(amount/10000); 
     console.log(amount2); 

     $(".slideanimate").css({"-webkit-transform": 'scale(' + amount2 + ')', "-moz-transform": 'scale(' + amount2 + ')', "transition": "all 0.3s"}); 

     if($(window).scrollTop() > 700) { 
     $(".navhome1").css({"-webkit-opacity": "0", "-moz-opacity": "0", "opacity": "0"}); 
     } else { 
     $(".navhome1").css({"-webkit-opacity": "1", "-moz-opacity": "1", "opacity": "1"}); 
     } 
    }); 
    }; 
}); 

이 도와주세요 여기

은 웹 링크입니다. 감사합니다

답변

0

사례가 해결되었습니다.

데스크톱 검색이 추가됩니다. 전체 코드는 다음과 같습니다.

$(window).ready(function() { 

    var pageWidth = $(window).width(); 
    var istablet = (/ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase())); 
    var isDesktop = (function() { 
    return !('ontouchstart' in window) // works on most browsers 
    || !('onmsgesturechange' in window); // works on ie10 
    })(); 
    window.isDesktop = isDesktop; 

    if (isDesktop || istablet) { 
    $(window).on('scroll',function() { 
     var amount = $(window).scrollTop(); 
     var amount2 = 1-(amount/10000); 
     console.log(amount2); 

     $(".slideanimate").css({"-webkit-transform": 'scale(' + amount2 + ')', "-moz-transform": 'scale(' + amount2 + ')', "transition": "all 0.3s"}); 

     if(amount > 700) { 
     $(".navhome1").css({"-webkit-opacity": "0", "-moz-opacity": "0", "opacity": "0"}); 
     } else { 
     $(".navhome1").css({"-webkit-opacity": "1", "-moz-opacity": "1", "opacity": "1"}); 
     } 
    }); 
    }; 
}); 
관련 문제