MediaWiki:Common.js:修订间差异

跳到导航 跳到搜索
添加563字节 、​ 2022年5月4日 (星期三)
无编辑摘要
(恢复NierPod042讨论)的编辑至Saka的最后版本)
无编辑摘要
 
(未显示2个用户的37个中间版本)
第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 );
第91行: 第91行:


mw.hook( 'wikipage.content' ).add( createCollapseButtons );
mw.hook( 'wikipage.content' ).add( createCollapseButtons );
/////分页tab///////
$(document).ready( function(){
    $(".tab").each(function(indextabs) {
        $(this).click(function(e) {
            //所点击的同胞去除active
            $(this).siblings().removeClass("active");
            //同一个div下的 .tab-c 去除active
            $(this).parent().siblings().find(".tab-c").removeClass("active");
           
            $(this).toggleClass("active");
            $(".tab-c")
                .eq(indextabs)
                .toggleClass("active");
        });
    });
});
///////结束////////

导航菜单