How to scroll using the scroll bar by partially displaying the scroll bar on the smartphone.steemCreated with Sketch.

in #programming7 years ago

Write it as a memorandum.

For example use this.
http://manos.malihu.gr/jquery-custom-content-scroller/

<script>
(function($){
    $(window).on("load",function(){
        $(".scroll_content").mCustomScrollbar();
    });
    $('.mCSB_1_scrollbar').on('touchmove', function(){
        $(window).on('touchmove.noScroll', function (e) {
            e.preventDefault();
        });
    });
    $('.mCSB_1_scrollbar').on('touchend', function(){
        $(window).off('.noScroll');
    });
})(jQuery);
</script>

By writing like this, can use the scroll bar on smartphone.
I spent a huge amount of time to get to this.
I am stupid, so I write it down.

Sort:  

This post received a 3.5% upvote from @randowhale thanks to @mun! For more information, click here!