停止动画“scrollLeft”或“向右滚动”当悬停时
我正在尝试破解一个插件来满足客户的要求。 基本上,该插件是一个图像库,其中有缩略图和大预览。缩略图位于轮播内。现在,我想在图像顶部或容器内部时禁用自动滚动。
我(在 SO 用户的大力帮助下)在查看大预览时已经将事件切换为悬停。
您可以在此处查看演示:http://jsbin.com/enezol/12
thumbs.hover( 功能(){ //当鼠标指针位于缩略图列表内时不滚动或移动 $('.ad-thumb-list').stop(); }, 功能(){ //回到原来的状态 // ??? }
我试图禁用一个功能(自动滚动),当鼠标位于包含缩略图的容器内时,它不应移动。如果缩略图不断从左向右移动,用户将很难查看缩略图。
您可能想知道为什么我将“点击”事件切换为“悬停”事件,原因是客户的要求。
I'm trying to hack a plugin to work to my client's requirement.
Basically the plugin is a image gallery where it has thumbnails and a large preview. the thumbnails are inside the carousel. Now, I want to disable the auto scrolling when it is on top the image(s) or inside the container.
I (w/ big help of SO user) already did switched event to hover when viewing the the large preview.
You can see a demo here: http://jsbin.com/enezol/12
thumbs.hover( function(){ //Do not scroll or move when the mouse pointer is inside the list of thumbnails $('.ad-thumb-list').stop(); }, function(){ //Back to its orginal state // ??? }
I'm trying to disable a function (autoscrolling) that when the mouse are inside the container containing of the thumbnails It shouldn't move. It's hard for user to view the thumbnails if it keeps moving from left to right.
You might be wondering why I switch the 'click' event to a 'hover' event, reason for that is client's requirement.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试取消该活动可能值得一试,就像这样......
It might be worth a shot to try cancelling the event, like so...