开发者

Javascript Inertial side scroll on mouseover

开发者 https://www.devze.com 2023-03-13 05:08 出处:网络
As I was looking through Killers Music html5 site, I wanted to do what they did with main navigation where when mouse is over to left or right, it will scroll infinite.

As I was looking through Killers Music html5 site, I wanted to do what they did with main navigation where when mouse is over to left or right, it will scroll infinite.

I have when through their javascript fil开发者_开发技巧e, also inspected elements and one thing was for sure, they update left css property to scroll the background images.

I am not quite sure how to do that smoothly. I know I can use setTimeout to update the left but not sure what value I have to calculate to apply. I am going to need someone's help or if there is any tutorial for it, it would be wonderful.

Please help.


It uses the jQuery easing plugin.

Some demo are available here: http://jqueryui.com/demos/effect/easing.html

0

精彩评论

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