我的理解是您想在选项卡式面板中创建页面。解决方案可以是:在 Spry 选项卡式面板中创建另一个 Spry 选项卡式面板。
用示例链接编辑:这是源代码:
<body>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Main Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0">Main Tab 2</li>
<li class="TabbedPanelsTab" tabindex="0">Main Tab 3</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">Main Content 1</div>
<div class="TabbedPanelsContent">Main Content 2
<div id="TabbedPanels2" class="VTabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Sub Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0">Sub Tab 2</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">Sub Content 1
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#" onclick="TabbedPanels2.showPanel(1); return false;">Go to Menu 2</a></li>
</div>
<div class="TabbedPanelsContent">Sub Content 2</div>
</div>
</div>
</div>
<div class="TabbedPanelsContent">Main Content 3</div>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
</script>
</body>
在您的CSS中,添加以下内容:
.VTabbedPanels .TabbedPanelsTabGroup {
display: none;
}
现在,选项卡式面板内的选项卡已隐藏。只显示内容。
此外,添加此项以扩大面板内容内容的宽度:
.VTabbedPanels .TabbedPanelsContentGroup {
width: 99%;
height: 100%;
border: 0;
}
笔记:
为了:
<a href="#" onclick="TabbedPanels2.showPanel(1); return false;">Go to Menu 2</a>
showPanel( 0 ) -第一个选项卡;showPanel( 1 ) -第二个选项卡,依此类推。