开发者

scroll with mouse wheel and mouse movement

开发者 https://www.devze.com 2023-03-18 20:08 出处:网络
I try to make a gallery that I can move in its content with mouse wheel or with mouse movement. I used the following script for mouse movement http://valums.com/files/2009/menu/final.htm and for mou

I try to make a gallery that I can move in its content with mouse wheel or with mouse movement.

I used the following script for mouse movement http://valums.com/files/2009/menu/final.htm and for mouse wheel I use Mouse Wheel Plugin.

Separately they work great but when I try to combine them I have some problems. Check the following demo:

http://jsfiddle.net/A93mF/

As you can see partially works but, and I say partially because when I use mouse wheel to scroll it's ok, but when I move a bit the cursor then returns in the previous position.

How can I make it so, if I scroll an开发者_运维问答d then move the cursor to continue normally the scrolling instead of return in the previous position?

Any solution is acceptable (change javascript[jQuery], html structure, plugin or whatever)


I rewrote the mouse movement script and now I think is works fine and in Chrome also (thanks @Nicola Peluchetti ) For anyone interested can check the following demo: http://jsfiddle.net/A93mF/3/

0

精彩评论

暂无评论...
验证码 换一张
取 消