我正在尝试从href链接到 jQuery 选项卡,但它似乎不起作用。你如何去做这件事。我希望在用户单击链接时打开一个选项卡。到目前为止,这是我的代码:http: //jsfiddle.net/AXEEe/。
HTML
<a href="#Allocated">Allocated</a>
<a href="#Declined">Declined</a>
<a href="#Pending">Pending</a>
<a href="#Failed">Failed</a>
<div style="padding-top: 10px">
<div id="tabs">
<ul>
<li><a href="#Allocated" id="#Allocated">Allocated Requests</a></li>
<li><a href="#Declined">Declined Requests</a></li>
<li><a href="#Pending">Pending Requests</a></li>
<li><a href="#Failed">Failed Requests</a></li>
</ul>
<div id="Allocated">
Content 1
</div>
<div id="Declined">
Content 2
</div>
<div id="Pending">
Content 3
</div>
<div id="Failed">
Content 4
</div>
</div>
</div>
<strong>JS
$(function() {
$( "#tabs" ).tabs();
});