jScrollPane的使用需注意的问题

使用方法:

<!-- styles needed by jScrollPane -->
<link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" />

<!-- latest jQuery direct from google's CDN -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>

<!-- the mousewheel plugin - optional to provide mousewheel support -->
<script type="text/javascript" src="script/jquery.mousewheel.js"></script>

<!-- the jScrollPane script -->
<script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script>

Then you just need to initialise jScrollPane on document.ready (using a selector which will find the content you want to apply jScrollPane to):

$(function()
{
	$('.scroll-pane').jScrollPane();
});
.scroll-pane不可以定义高度,否则不会出现横向滚动条
原文地址:https://www.cnblogs.com/lv_yantao/p/2228339.html