jScrollPane - MouseWheel无法正常工作

Ste*_*eve 4 scrollbar mousewheel jscrollpane jquery-jscrollpane

我正在使用jScrollPane,因为它是Google上的第一件事,我很累.所以,我首先要说的是我并不反对使用不同的东西.

我有一个2列的部分.右列使用jScrollPane插件并具有固定宽度.拖动滚动条时它可以工作,但鼠标滚轮插件似乎不起作用.我按此顺序调用所有内容:

jquery.jscrollpane.css  
jquery.jscrollpane.lozenge.css  
jquery.min.js  
jquery.mousewheel.js  
mwheelIntent.js  
jquery.jscrollpane.min.js
Run Code Online (Sandbox Code Playgroud)

标记:

<div class="twocolumn">
  <div class="img-lt"></div>
  <div class="txt-rt scroll-pane">...</div>
</div>
Run Code Online (Sandbox Code Playgroud)

这是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;
}
Run Code Online (Sandbox Code Playgroud)

并且针对页面准备就绪
$(function(){ $('.scroll-pane').jScrollPane(); });

控制台报告没有错误.有什么想法吗?

fun*_*fly 15

我猜你正在使用jQuery 1.7.如果是这样,则需要更新控制滚轮的插件.(jScrollPane插件中的一个依赖项).

链接在这里:

https://github.com/brandonaaron/jquery-mousewheel/

  • 我认为你不必降级jQuery.只需升级我链接到的滚轮插件即可.它是jScrollPane的依赖项之一.祝好运!:) (2认同)