gpt4 book ai didi

jQuery ui 选项卡 heightStyle : auto not working - getting height from wrong tab

转载 作者:行者123 更新时间:2023-12-01 01:42:47 25 4
gpt4 key购买 nike

我正在使用 jQuery UI 选项卡,并且根据文档设置了 heightStyle: "auto"以使所有选项卡与最高的选项卡一样高。

这是我用来初始化选项卡的代码:

$( "#tabs" ).tabs({
heightStyle: "auto",
hide: { effect: "drop", duration: 300 }
});

但是,它并未将选项卡高度设置为最高,并且似乎使用了不同页面上不同选项卡的高度。

关于this页面中最高的选项卡是第一个选项卡“模型概述”,但它将高度设置为“图库”选项卡。

关于this页面最高的是“模型规范”,现在似乎将高度设置为“模型概述”。

我已经在 Google 上搜索了好几个小时了,但还是找不到答案,请帮忙。

谢谢!

最佳答案

我今天遇到了这个问题(比你晚大约一年),我注意到一个原因可能是你在调用 tabs() 后更改了选项卡的内容。

例如,我必须更改此:

$( "#tabs" ).tabs({heightStyle: "auto"});
codeThatBuildsTabsContents();

对此:

codeThatBuildsTabsContents();
$( "#tabs" ).tabs({heightStyle: "auto"});

此外,如果您想更改任何选项卡的内容,则必须刷新选项卡:

codeThatAltersTabsContents();
$( "#tabs" ).tabs('refresh');

关于jQuery ui 选项卡 heightStyle : auto not working - getting height from wrong tab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34611267/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com