0
我有三個選項卡使用jQuery工具選項卡。每個選項卡都會觸發不同的div。然而,我需要第二個和第三個標籤在不同的位置觸發兩個div(主要的是,我試過使用tab索引無效,所以問題是,我怎樣才能得到第二個和第三個標籤來觸發兩個div?jquery-tools選項卡 - 需要一個特定的選項卡來加載兩個div onClick
我回到了標籤的基本加載方法
<script>
$(function() {
$("ul.tabs").tabs("div.panes > div");
});
</script>
的HTML如下:。
<div id="search-wrapper">
<div id="navcontainer">
<ul class="tabs">
<li><a href="#">Tab 0</a></li>
<li><a href="#">Tab 1</a></li>
<li><a href="#">Tab 2</a></li>
</ul>
</div>
<input type="text" name="searchinput" id="searchinput" size="30">
<input type="submit" value="Search" />
<!-- I need this div to open onClick of Tab 1 and Tab 2-->
<div style="display: none" id="categoryselector">
This will contain specific selectors for the search.
</div>
</div><!--end of search-wrapper-->
<!-- Below are the main tabs that open correctly -->
<div class="panes">
<div class="tabcontent">Tab 0</div>
<div class="tabcontent">Tab 1</div>
<div class="tabcontent">Tab 2</div>
</div>
任何幫助表示讚賞
這是正確的軌道。我最終使用的實際代碼是$(function(){{({「ul.tabs」)。tabs(「div.panes> div」,{ onClick:function(event,tabIndex){ \t \t if if(tabIndex == 1 || tabIndex == 2){('#categoryselector')。show(); if(tabIndex == 1 || tabIndex == 2){('#categoryselector')。hide(); } if } } }); }); – SeasonEnds 2012-02-10 20:57:09