我正在使用以下代码为我的 jscrollpane 分配新箭头。这在所有浏览器中都可以正常工作,但在 ie7/8 中存在问题。可以在http://jsfiddle.net/WzNM4/6/上找到该错误的示例。
如果单击向下按钮,让它运行 2 秒,然后单击向上按钮,文本开始上下跳跃。您知道是什么原因造成的以及如何解决吗?
我知道我附加的代码与 jsFiddle 中的不一样,但是 jsFiddle 是由 Vitch 完成的,我觉得没有必要重做它,因为该错误也发生在他的版本上。
这只发生在 ie7/8 中...
先感谢您。
$(function () {
var api = $('.ThmbsCntnr').jScrollPane().data('jsp');
$('.FinalArrowLeft').bind('mousedown', function () {
var interval = setInterval(
function () {
api.scrollByX(-40);
},
100
);
$(window).bind(
'mouseup.jspExample',
function () {
clearInterval(interval);
$(document).unbind('.jspExample');
}
);
});
$('.FinalArrowRight').bind('mousedown', function () {
var interval = setInterval(
function () {
api.scrollByX(40);
},
100
);
$(window).bind(
'mouseup.jspExample',
function () {
clearInterval(interval);
$(document).unbind('.jspExample');
}
);
});
});