jQuery - Continuously scroll div on hover

邮差的信 提交于 2019-12-25 04:55:12

问题


I wish to build a shelf of content much like on Netflix where when you hover over arrows on either end the shelf scrolls at a continuous speed. Ideally, I would also like to make it so when you click the arrows it scrolls a chunk along, so you have the option to click like made to get through a shelf quickly.

This will be using lazy loading so you don't need to worry about repeating content, but obviously it won't have a set width (other then the outside container being 100% with overflow scroll.

Also, this needs to be actually scrollable, so it will work on tablets/phones.

I have no idea here to start so any directions would be great.

Thanks, Jake!

Image of netflix shelf.


回答1:


UPDATE: Check out the Smooth Div Scroll jQuery plugin. It slides continuously through the image, you can hover the mouse on the div and manually scroll back- and forward.

Original answer: I might be off with that, but check out these two plugins:

jQuery Coverflow plugin or the jQuery Imageflow plugin

I think the keyword you are looking for is "flow" and there are multiple flow plugins for jQuery. Hope this helps.

Best regards, Michael



来源:https://stackoverflow.com/questions/19356913/jquery-continuously-scroll-div-on-hover

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!