イベントで、divのこのアニメーション化された水平オフセットに取り組んでいmousescroll
ます。ここに私が今までやってきたことへのリンクがあります。誰かが私が間違っていることを見ることができますか?
アニメーションは、マウススクロールにも同じことが必要なクリックアクションで発生します。 http://jsfiddle.net/laksdesign/WvRR6/
jQuery(document).ready(function($) {
$(".scroll").click(function(event) {
event.preventDefault();
$('#wrapper').animate({ scrollLeft: $('#wrapper').scrollLeft() + $(this.hash).offset().left }, 800);
});
$('body').bind('mousewheel', function(scroll){
if(scroll.originalEvent.wheelDelta /120 > 0) {
scroll.preventDefault();
$('#wrapper').animate({ scrollLeft: $('#wrapper').scrollLeft() + $(this.hash).offset().left }, 800);
} else{
}
});
});
マウススクロールに基づいてアニメーションを撮った別の参照があります: http://jsfiddle.net/laksdesign/EATaU/