So I fiddled some solution of my own, you can see example here
Thanks Tom for leading me to this answer.
JS:
function wheel($div,deltaY){
var step = 30;
var pos = $div.scrollTop();
var nextPos = pos + (step*(-deltaY))
console.log("DelatY: " + deltaY + ", Step: " + step + ", nextPos: " + nextPos);
$div.scrollTop(nextPos);
}
$('#test').bind('mousewheel', function(event, delta, deltaX, deltaY) {
wheel($(this),deltaY);
event.preventDefault();
});
Used libraries:
- jQuery 1.8.3
- jQuery mousewheel
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…