function scrollStart(){ $('body').mCustomScrollbar({ theme:"thick", scrollInertia:700, // mouseWheelPixels:10, horizontalScroll:false, // axis:"yx", scrollbarPosition:"outside",//滚动线的位置,在容器内部还是外部 inside(default)|outside (如果容器的position是static值,则添加position:relative) autoDraggerLength: true,//根据内容区域自动调整滚动条拖块的长度 autoExpandScrollbar: true, advanced:{ updateOnContentResize:true, } }); } function scrollDestroy(){ $('body').mCustomScrollbar("destroy") }