我正在使用jScrollPane,仅仅是因为它是谷歌上的第一条记录,而我已经非常疲惫了。所以,我要先说一下,我并不反对使用其他东西。
我有一个两列的部分。右侧列使用jScrollPane插件,并且具有固定的宽度。当你拖动滚动条时,它可以工作,但鼠标滚轮插件似乎无法工作。我按照以下顺序调用所有内容:
jquery.jscrollpane.css
jquery.jscrollpane.lozenge.css
jquery.min.js
jquery.mousewheel.js
mwheelIntent.js
jquery.jscrollpane.min.js
标记语言:
标记:
<div class="twocolumn">
<div class="img-lt"></div>
<div class="txt-rt scroll-pane">...</div>
</div>
这里是CSS代码:
#content .twocolumn { overflow:hidden; }
#content .twocolumn .img-lt {
padding-right:22px;
border-right:1px solid #818283;
float:left;
}
#content .twocolumn .txt-rt {
padding-left:22px;
float:left;
width:556px;
height:409px;
}
并且是通过以下代码在页面准备好后进行操作:
$(function(){ $('.scroll-pane').jScrollPane(); });
控制台没有报错。有什么想法吗?