该插件的下载地址:
https://codeload.github.com/rochal/jQuery-slimScroll/zip/v1.3.0
安装Set up
首先需要引入jquery
在次需要引入:<script src="${ctx }/common/js/jquery.slimscroll.js" type="text/javascript"></script>
一个example如下:
html:
<div class="some-content-related-div">
<div id="inner-content-div">
<p>Lorem ipsum dolor sit amet, consectetur .... snip</p>
</div>
</div>
j代码:
$(function(){
$('#inner-content-div').slimScroll({
height: '250px'
});
});
width - Width in pixels of the visible scroll area. Stretch-to-parent if not set. Default: none
height - Height in pixels of the visible scroll area. Also supports auto to set the height to same as parent container. Default: 250px