重新单击时 jquery 选项卡消失
这是我的测试页面(现在不介意布局)
https://www .bcidaho.com/test_kalyani/employer-plans-test.asp
我发现了一些奇怪的东西。如果您在选项卡 1 和选项卡 2 之间来回单击,那就没问题了。
如果您单击选项卡 3,然后转到另一个选项卡,内容就会消失...我不明白为什么???
我很困惑,不明白为什么它会这样做......它是 CSS 中的 display:hide 元素吗?
以下是 CSS 文件的链接: https://www.bcidaho.com/css/employer .css
这里是我使用的 javascript 文件的链接: https://www.bcidaho.com/js/ui.toggle-employers。 js https://www.bcidaho.com/js/tabbed-menu3.js
Here is my test page (dont mind the layout right now)
https://www.bcidaho.com/test_kalyani/employer-plans-test.asp
i found something weird. if you click back and forth between tab 1 and tab 2, its fine.
if you click tab 3, and got to another tab, the content dissapears... and i can not figure out why???
I am boggled, and can not figure out why it does this.... is it a display:hide element in the CSS?
here is a link to the CSS file: https://www.bcidaho.com/css/employer.css
here is a link to the javascript files that i use:
https://www.bcidaho.com/js/ui.toggle-employers.js
https://www.bcidaho.com/js/tabbed-menu3.js
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到您设置这些选项卡显示的方式是通过:
当您单击选项卡 2 时,它会更改为
当您返回选项卡 1 时,它会更改为
但是当您单击选项卡 3 时,我看到:
所以我怀疑发生的情况是您需要确保当我单击选项卡 3 时,“当前”类从之前的当前类中删除,然后“添加”到选项卡 3:
The way I see you are setting display for these tabs is via:
When you click on tab 2 it changes to
When you click back on tab 1 it changes to
But when you click on tab 3 I see:
So I suspect that what is going on is that you need to make sure that when tab three i clicked that the "current" class is removed from the prior current class and then "added" to tab 3: