我有三个使用jquery tools选项卡的选项卡。每个选项卡触发不同的div。但是,我需要第二个和第三个选项卡在不同的位置触发两个div( main。我已经尝试使用制表符索引,但没有用。因此,问题是,如何才能让第二个和第三个选项卡触发两个div?
我回到了选项卡的基本加载方法。
<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>任何帮助都是非常感谢的。
发布于 2012-02-10 06:57:56
查看他们的文档
http://flowplayer.org/tools/tabs/index.html
绑定到选项卡的单击事件。
$(function() {
$("ul.tabs").tabs("div.panes > div", {
onClick: function(event, tabIndex) {
if (tabIndex == 1 || tabIndex == 2) {
$('#categoryselector').show();
}
}
});
});https://stackoverflow.com/questions/9220127
复制相似问题