gpt4 book ai didi

javascript - jquery 选项卡默认选项卡

转载 作者:行者123 更新时间:2023-11-28 07:55:39 26 4
gpt4 key购买 nike

我的网页上有 jQuery 表:

<script>
$(function () {
$("#tabs").tabs({
beforeLoad: function (event, ui) {
ui.jqXHR.error(function () {
ui.panel.html(
"Couldn't load this tab. " +
"We'll try to fix this as soon as possible");
});
}
});
});
</script>

<div id="tabs">
<ul>
<li><a href="location.php">Name1</a></li>
<li><a href="location.php">Name2</a></li>
<li><a href="location.php">Name3</a></li>
<li><a href="location.php">Name4</a></li>
<li><a href="location.php">Name5</a></li>
<li><a href="location.php">Name6</a></li>
<li><a href="location.php">Name7</a></li>
<li><a href="location.php">Name8</a></li>
<li><a href="log.php">Name9</a></li>
</ul>
</div>

如何在此脚本上设置默认名称(表)?因为这应该有效,但没有任何作用:

$( "#tabs" ).tabs({active: 2});

最佳答案

<script>
$(function() { $( "#tabs" ).tabs({active : 5},{ beforeLoad: function( event, ui ) { ui.jqXHR.error(function()
{ ui.panel.html(
"Couldn't load this tab. " +
"We'll try to fix this as soon as possible" ); }); } });
});

关于javascript - jquery 选项卡默认选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26120825/

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