您的位置:首页 > Web前端 > JavaScript

jScrollPane的使用需注意的问题

2011-10-29 08:59 183 查看
使用方法:

<!-- 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不可以定义高度,否则不会出现横向滚动条
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: