好的,第二次发布这个问题,我第一次在错误的区域发布了这个aplogogies。 我已经使用自定义css和DNNTabs插件向我们的DNN 7.02站点中的模块添加了多行,JQuery选项卡解决方案。 选项卡加载并正常工作,但默认情况下在页面加载时不会折叠,它们也不会关闭单击事件上的选项卡窗格。
我包含了标记和javascript,希望你们中的一些人能够发现问题
<div id="tabs-services-row1">
<ul class="toptabs">
<li>
<a href="#tabs-services-1"><span class="icon-bins"> </span> Service 1</a></li>
<li>
<a href="#tabs-services-2"><span class="icon-map"> </span> Service 2</a>
</li>
<li>
<a href="#tabs-services-3"><span class="icon-credit"> </span> Service 3</a>
</li>
<li>
<a href="#tabs-services-4"><span class="icon-users2"> </span> Service 4</a>
</li>
</ul>
<!-- BINS AND RECYCliNG TAB -->
<div id="tabs-services-1" class="tab-pane">
<ul>
<li>
<a href="#" title="Bin collections"><span class="icon-calendar"> </span> S1 1</a>
</li>
<li>
<a href="#" title="blah?"><span class="icon-question"> </span> s1 2? <!-- <span class="subitem-desc""> Here you will find this and that </span> -->
</a>
</li>
</ul>
</div>
<!-- End #tabs-1 -->
<div id="tabs-services-2" class="tab-pane">
<ul>
<li>
<a href="#" title="blah"><span class="icon-search"> </span> S2 1 <!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
<li>
<a href="#" title="S2 1"><span class="icon-office"> </span> S2 2<!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
</ul>
</div>
<!-- End #tabs-2 -->
<div id="tabs-services-3" class="tab-pane">
<ul>
<li>
<a href="#" title="Pay your council tax"><span class="icon-credit"> </span> S3 1 <!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
<li>
<a href="#" title="blah"><span class="icon-stats"> </span> S3 2<!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
</li>
</ul>
</div>
<!-- End #tabs-3 -->
<!-- JOBS TAB -->
<div id="tabs-services-4" class="tab-pane">
<ul>
<li>
<a href="#" title="BLAH"><span class="icon-pen"> </span> S4 1</a>
</li>
<li>
<a href="#" title="blah"><span class="icon-arrow-right"> </span> S4 2 <!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
<li>
<a href="#" title="Supported employment"><span class="icon-support"> </span> S4 3 <!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
</ul>
</div>
<!-- End #tabs-4 -->
</div>
<!-- End row1 *************************************************************************************************************
************************************************************************************************************************** -->
<!--=================================================================================================================================================================================================-->
<!-- Start row2 -->
<div id="tabs-services-row2">
<ul class="toptabs">
<li>
<a href="#tabs-services-5"><span class="icon-calculate"> </span> Service 5</a>
</li>
<li>
<a href="#tabs-services-6"><span class="icon-earth"> </span> Service 6</a>
</li>
</ul>
<div id="tabs-services-5" class="tab-pane">
<ul>
<li>
<a href="#" title="BLAH"><span class="icon-home-2"> </span>S5 1 <!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
<li>
<a href="#" title="BLAH"><span class="icon-pie"> </span> S5 2 <!-- <span class="subitem-desc""> Here you will find this and that </span> -->
</a>
</li>
</li>
</ul>
</div>
<!-- End #tabs-5 -->
<div id="tabs-services-6" class="tab-pane">
<ul>
<li>
<a href="#" title="BLAH"><span class="icon-blocked"> </span> S6 1<!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
<li>
<a href="#" title="BLAH"><span class="icon-remove"> </span> S6 2 <!-- <span class="subitem-desc"> Here you will find this and that </span> -->
</a>
</li>
</ul>
</div>
<!-- End #tabs-6 -->
<div id="tabs-services-7" class="tab-pane">
<ul>
<li>
<a href="#" # title="BLAH"><span class="icon-search"> </span> S7 1</a>
</li>
<li>
<a href="#" title="BLAH"><span class="icon-info"> </span> S7 2</a>
</li>
</ul>
</div>
<!-- End #tabs-7 -->
<div id="tabs-services-8" class="tab-pane">
<ul>
<li>
<a href="8" title="BLAH"><span class="icon-warning"> </span> S8 1</a>
</li>
<li>
<a href="#" title="PBLAH"><span class="icon-credit"> </span> S8 2</a>
</li>
<li>
<a href="#" title="Apply for it"><span class="icon-pen"> </span> S8 3</a>
</li>
</ul>
</div>
</div>
现在为javascript
<script type="text/javascript">
jQuery(function ($) {
$("#tabs-services-row1, #tabs-services-row2").dnnTabs({
collapsible: true,
active: 'false', //none
selected: -1,
fx: { height: 'toggle', duration: 'normal'
}
});
});
</script>
<script type="text/javascript">
jQuery(function ($) {
$("#tabs-services-row1 ul.toptabs li a").click(function () {
$("#tabs-services-row2").Tabs('option', 'selected', -1);
});
$("#tabs-services-row2 ul.toptabs li a").click(function () {
$("#tabs-services-row1,").dnnTabs('option', 'selected', -1);
});
$("#tabs-services-row1.tab-pane a.btn-tabs-services-close").click(function () {
$("#tabs-services-row1, #tabs-services-row2").dnnTabs('option', 'selected', -1);
return false;
});
});
</script>
我没有包含css,因为它相当大,但可以包括,如果需要,虽然class =&#34; dnnAdminTabNav&#34;可以用来测试。
答案 0 :(得分:0)
查看以下网站http://uxguide.dotnetnuke.com/UIPatterns/Tabs.aspx 我也想念周围的事情:
<div class="dnnForm"></div>
但可以肯定这个网站会帮助你。