jQuery 滑块:颜色更改菜单不会与滑块的其余部分同步
所以我制作了一个具有滑动图像的滑块和一个随之滑动的菜单。
它的工作原理如下:
图像向左滑动,菜单随之移动,以便连接到当前图像的菜单按钮始终位于最左侧。 除此之外,菜单还会根据哪张幻灯片处于活动状态而改变颜色。
问题就从这里开始:
如果我只是让它自行滑动,它就会像应该的那样工作,但是如果我按下菜单中的任何按钮,并且下次它自动滑动时,菜单的颜色就会偏移。
菜单中最左边的按钮应始终为黄色,而其他按钮距离黄色按钮越远,灰色应越亮。
以下是滑块的链接:http://server.patrikelfstrom.se/rcane/slider/
JavaScript: http://server.patrikelfstrom.se/rcane/slider/slider.js
CSS: http://server.patrikelfstrom.se/rcane/slider/slider.css
我知道这是一个大问题,但我不知道该如何解决这个问题。请帮忙。谢谢。
(我正在使用 jquery 1.3,因为我构建这个网站就是为了使用它。(我知道它又旧又蹩脚,但我无法更改))
So I have made a slider that has sliding images and a menu that slides with it.
It works like this:
The images slide to the left and the menu moves with it so that the menu button that is connected to the current image is always on the far left.
And in addition to that the menu changes color depending on which slide is active.
And it's here the problems start:
If I just let it slide by it self it works like it should but if I press any buttons in the menu and the next time it slides automatically the colors of the menu gets offset.
The button to the far left in the menu should always be yellow and the other buttons should get a brighter gray as further away they are from the yellow one.
Here is a link to the slider: http://server.patrikelfstrom.se/rcane/slider/
Javascript: http://server.patrikelfstrom.se/rcane/slider/slider.js
CSS: http://server.patrikelfstrom.se/rcane/slider/slider.css
I know it's a big question but I can't figure out how I'm supposed to fix this. Please help. Thanks.
(I'm using jquery 1.3 because the site that I'm building this for use that. (I know old and crappy, but I can't change))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也找不到它,但要达到这一点,必须在点击功能中的某个地方触发该错误:
如果自动滑块再次开始滑动,它似乎会破坏位置。
如果您每次点击都开始点击,请尝试以某种方式重置resetSliderInterval函数。
i cant find it too but to get to a point the bug must be triggered somewhere in the click function:
it seems like its breaking up the positions if the autoslider starts again with sliding.
try to reset somehow the resetSliderInterval function if you start clicking around with each click.