jquery滚动条
这几天我一直在寻找问题的解决方案 并想知道 stackoverflow 社区的任何人是否可以帮助我。
我的问题是我需要一个 jquery 轮播和一个 jquery 滚动条来协同工作。 轮播会更新滚动条,反之亦然,而且还会更新滚动条本身内所显示内容的信息(例如 (1/12),因此将显示 12 张幻灯片/图像中的 1 张)。如果我可以让滚动条在拖动或拉动过程中捕捉并更新显示的信息,这也会带来额外的好处。
我不知道从哪里开始,因为我不知道 jCarousel 是否支持使用 jScrollpane 与相同的元素。如果有人可以分解实际需要发生的事情的过程,那就太好了。
我还将尝试添加一个图表,以防您完全不明白需要做什么。
<<--------| 5/12 |-------->>
这是我努力画出我想要解释的内容。正如您所看到的,正在显示的轮播幻灯片的信息位于可拖动的滚动条块中。如果有人能指出我正确的方向,我将非常感激。
更新:我已经启动了 jsfiddle,以便人们可以看看我试图解释的内容。我正在使用两个插件范围输入和范围输入的组合。由同一个人/团队制作的可滚动文档可以在此处找到 以及我的 jsfiddle 另一个更新的链接
:越来越接近我希望它运行的方式,只需要帮助平滑脚本
I've been looking for a solution to my problem for a few days now
and was wondering if anyone from the stackoverflow community can help me.
My problem is that I need a jquery carousel and a jquery scrollbar to work hand-in-hand.
The carousel updates the scrollbar and vice versa but also information of what being displayed is within the scroll bar itself (for example (1/12) so it would be 1 of 12 of slides/image is displayed ). It would also be added bonus if I can get the scrollbar to snap and update the displayed information whenever it is in the process of being dragged or pulled.
I don't know where to start because I don't know if jCarousel supports the usage of jScrollpane with the same element. If someone can kindly breakdown the process of what actually needs to happen it would be great.
I'm also going to try and add a diagram in case you fully didn't understand what needs to be done.
<<--------| 5/12 |------->>
That was my effort at drawing what I'm trying to explain. As you can see the information of what carousel slide is being displayed is in the scrollbar block which is dragable. If anyone can even point me in the right direction I would be truly grateful.
UPDATE : I have started a jsfiddle so people can take a look at what im trying to explain. I'm using a combination of two plug-ins range input & scrollable made by the same people/team the docs be found can Here
and the link to my jsfiddle
ANOTHER UPDATE : Edging ever closer to how i want it to run just need help smoothing out the the script
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 .animate() 和 .scrollLeft() :
抱歉,我一开始不知道你想要什么......听起来像 这就是你想要的。真正的关键是 jQuery 的
.scrollLeft()
..我给出的例子还使用.animate()
使其看起来更好。jQuery
Using .animate() and .scrollLeft() :
sorry I didn't know what you wanted at first... it sounds like this is what you want. The real key is jQuery's
.scrollLeft()
.. The example I give also uses.animate()
to make it look nicer.jQuery