MediaWiki:Common.js:修订间差异

跳到导航 跳到搜索
添加46字节 、​ 2022年5月4日 (星期三)
无编辑摘要
无编辑摘要
无编辑摘要
 
(未显示2个用户的28个中间版本)
第65行: 第65行:
             ButtonLink.appendChild( ButtonText );
             ButtonLink.appendChild( ButtonText );


             Button.appendChild( document.createTextNode( '[' ) );
             //Button.appendChild( document.createTextNode( '[' ) );
             Button.appendChild( ButtonLink );
             Button.appendChild( ButtonLink );
             Button.appendChild( document.createTextNode( ']' ) );
             //Button.appendChild( document.createTextNode( ']' ) );


             Header.insertBefore( Button, Header.firstChild );
             Header.insertBefore( Button, Header.firstChild );
第93行: 第93行:


/////分页tab///////
/////分页tab///////
$(".tab").each(function(index) {
$(document).ready( function(){
  $(this).click(function(e) {
    $(".tab").each(function(indextabs) {
    triggletab();
        $(this).click(function(e) {
    triigletabcontent();
            //所点击的同胞去除active
    $(this).toggleClass("active");
            $(this).siblings().removeClass("active");
    $(".tab-c")
            //同一个div下的 .tab-c 去除active
      .eq(index)
            $(this).parent().siblings().find(".tab-c").removeClass("active");
      .toggleClass("active");
           
  });
            $(this).toggleClass("active");
            $(".tab-c")
                .eq(indextabs)
                .toggleClass("active");
        });
    });
});
});
//to remove all tab headers
function triggletab() {
  $(".tab").each(function() {
    $(this).removeClass("active");
  });
}


//triggle the tab content
function triigletabcontent() {
  $(".tab-c").each(function() {
    $(this).removeClass("active");
  });
}
///////结束////////
///////结束////////

导航菜单