jquery自定义滚动条插件示例分享(4)

<!-- content block -->
<div>
 <div>
  <!-- horWrapper div is important for horizontal scrollers! -->
  <div>
  <div>
      <div>
          <h4>Horizontal non-adjustable image scroller with easing</h4>
             <p><img src="https://www.jb51.net/mcsThumb1.jpg" /><img src="https://www.jb51.net/mcsThumb2.jpg" /><img src="https://www.jb51.net/mcsThumb3.jpg" /><img src="https://www.jb51.net/mcsThumb4.jpg" /><img src="https://www.jb51.net/mcsThumb5.jpg" /><img src="https://www.jb51.net/mcsThumb6.jpg" /><img src="https://www.jb51.net/mcsThumb7.jpg" /><img src="https://www.jb51.net/mcsThumb8.jpg" /><img src="https://www.jb51.net/mcsThumb1.jpg" /><img src="https://www.jb51.net/mcsThumb2.jpg" /><img src="https://www.jb51.net/mcsThumb3.jpg" /><img src="https://www.jb51.net/mcsThumb4.jpg" /></p>
   </div>
  </div>
  <div>
      <div></div>
  </div>
  </div>
 </div>
    <a href="#">&#8678;</a> <a href="#">&#8680;</a>
    <p><font color="#FFFFFF">适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.
 </font> </p>
<div>
<div>
</div>
</div>
</div>

<!-- content to show if javascript is disabled -->
<noscript>
 <style type="text/css">
  #mcs_container .customScrollBox,#mcs2_container .customScrollBox,#mcs3_container .customScrollBox,#mcs4_container .customScrollBox,#mcs5_container .customScrollBox{overflow:auto;}
  #mcs_container .dragger_container,#mcs2_container .dragger_container,#mcs3_container .dragger_container,#mcs4_container .dragger_container,#mcs5_container .dragger_container{display:none;}
 </style>
</noscript>

<script>
$(window).load(function() {
 mCustomScrollbars();
});

function mCustomScrollbars(){
 /*
 malihu custom scrollbar function parameters:
 1) scroll type (values: "vertical" or "horizontal")
 2) scroll easing amount (0 for no easing)
 3) scroll easing type
 4) extra bottom scrolling space for vertical scroll type only (minimum value: 1)
 5) scrollbar height/width adjustment (values: "auto" or "fixed")
 6) mouse-wheel support (values: "yes" or "no")
 7) scrolling via buttons support (values: "yes" or "no")
 8) buttons scrolling speed (values: 1-20, 1 being the slowest)
 */
 $("#mcs_container").mCustomScrollbar("vertical",400,"easeOutCirc",1.05,"auto","yes","yes",10);
 $("#mcs2_container").mCustomScrollbar("vertical",0,"easeOutCirc",1.05,"auto","yes","no",0);
 $("#mcs3_container").mCustomScrollbar("vertical",900,"easeOutCirc",1.05,"auto","no","no",0);
 $("#mcs4_container").mCustomScrollbar("vertical",200,"easeOutCirc",1.25,"fixed","yes","no",0);
 $("#mcs5_container").mCustomScrollbar("horizontal",500,"easeOutCirc",1,"fixed","yes","yes",20);
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdyfwj.html