jQuery UI tabs.add() 创建两个选项卡,其中一个处于奇怪的位置,空且未使用

发布于 2024-12-28 22:25:03 字数 660 浏览 2 评论 0原文

请让我参考http://c.lrin.tk

Code structure:
--DIV main_window <-class: ui-tabs
----DIV top_bar
------UL          <-class: ui-tabs-nav
------[1]
----DIV ui-tabs-0
----[2]

当您按下顶部的“[+]”按钮激活“tabs.add()”事件时, 您可以看到每个显示选项卡的 ID 为 4、6、8、10、12 等。

这些预期的选项卡添加在位置 [2](参见代码结构), 同时在位置[1]处添加了一些空的、未使用的、奇数编号的选项卡。

类似的问题被报告为错误并在最新版本中修复,但我仍然得到这个。

有人说DIV top_bar是罪犯,但即使我删除了这个DIV,问题仍然存在。

有什么想法吗?请在您的示例中也使用 http://c.lrin.tk

谢谢。

Please let me refer to http://c.lrin.tk.

Code structure:

--DIV main_window <-class: ui-tabs
----DIV top_bar
------UL          <-class: ui-tabs-nav
------[1]
----DIV ui-tabs-0
----[2]

When you push the "[+]" button at the top to activate a "tabs.add()" event,
you can see that the id of each shown tab 4, 6, 8, 10, 12, and so on.

These expected tabs are added at position [2] (see Code structure),
while a few empty, unused, odd-numbered tabs are added at position [1].

An alike problem was reported as a bug and was fixed in the latest version, but I still gets this.

Somebody said DIV top_bar is the criminal, But even after I removed this DIV, the problem still remains.

Any ideas? Please use http://c.lrin.tk as well in your example.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

放手` 2025-01-04 22:25:03

“这不是一个错误,这是一个功能”。

当您查看 HTML 时,您可能会注意到“ui-widget-content”类。
大多数选项卡实现(实际上,我在网络上遇到的所有〜10个选项卡实现)都是这样工作的,这是可以的。每个选项卡 DOM 元素都有对应的选项卡内容元素。
为什么这个选项卡和内容元素混合使用 id?由于实施。

"This is not a bug, this is a feature".

Since you look at HTML, you may notice "ui-widget-content" class.
Most tab implementations (actually, all ~10 I met on web) works this way and this is ok. Each tab DOM element have corresponding element for tab content.
Why this one mixes ids for both tab and content elements? Due to implementation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文