jQuery 切换问题
我想要完成的事情看起来很简单,但是我不擅长 jQuery。
我确实尝试尽可能接近解决方案,但每当我单击锚标记两次时,所有内容都会消失。显然我做错了什么。
我希望 .slider1
默认可见,而 .slider2
隐藏。 此外,当单击锚点“Fader”
时,.slider1
会隐藏。
对任何人有帮助吗?
What I'm trying to accomplish seems quite simple however, I'm not great at jQuery.
I did try to get as close as possible to a solution but whenever I click on the anchor tag twice, everything disappears. Obviously I'm doing something wrong.
I would like .slider1
to be visible by default and .slider2
to be hidden.
Also, when the anchor "Fader"
is clicked, .slider1
is hidden.
Help anyone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经为您修复了代码:
http://jsfiddle.net/ZAPwD/
I have fixed up the code for you:
http://jsfiddle.net/ZAPwD/
像这样的东西吗?
这看起来交叉淡入淡出得很好:
http://martin-fleming.co.uk/examples/jquery-crossfade/
Something like this?
This looks like it cross fades pretty nicely:
http://martin-fleming.co.uk/examples/jquery-crossfade/