2017-10-27 8 views
0

jemand das Problem nicht auftreten, dass, wenn Setup „scrollButtons: {SCROLL: "gestufte"} Tasten nicht auf Touch-Geräten funktioniert Code:mCustomScrollbar scrollButtons - SCROLL: "gestufte"

$("container").mCustomScrollbar({ 
    setHeight: false, 
    autoExpandScrollbar:true, 
    snapAmount: height, 
    mouseWheel: { 
     enable: false, 
     scrollAmount: height, 
     normalizeDelta:true 
    }, 
    keyboard: { 
     enable: false, 
     scrollAmount: height 
    }, 
    scrollButtons: { 
     enable: true, 
     scrollAmount: 1, 
     scrollType: "stepped" 
    }, 
    advanced: { 
     updateOnContentResize: true 
    }, 
    scrollInertia: 1, 
    contentTouchScroll: 10000, 
    documentTouchScroll: false 
}); 
+0

Welche Version von mCustomScrollbar.js Sie? – Jinesh

+0

verwendet @Jinesh 3.1.5 (neueste) –

Antwort

0

können Sie? verwenden Sie diesen Code

<!-- custom scrollbar script --> 
<script src="/path/to/jquery.mCustomScrollbar.js"></script> 
<!-- detect mobile script --> 
<script src="http://cdnjs.cloudflare.com/ajax/libs/mobile-detect/1.3.5/mobile-detect.min.js"></script> 
<!-- custom scrollbar function call --> 
<script> 
    (function($){ 
     var md=new MobileDetect(window.navigator.userAgent); //get device type 
     $(window).load(function(){ 
      if(!md.mobile()){ //apply custom scrollbar if device is not mobile 
       $(selector).mCustomScrollbar(); 
      } 
     }); 
    })(jQuery); 
</script> 
+0

verstehen, aber ich will mCustomScrollbar @ Touch-Gerät :) –

+0

haben Sie versucht, meinen Code? – Jinesh

+0

mScrollba r zeigt nicht für Touch-Gerät –

Verwandte Themen