MediaWiki:Common.js:修订间差异

跳到导航 跳到搜索
添加453字节 、​ 2022年5月4日 (星期三)
无编辑摘要
(撤销873756069讨论)的版本8614)
无编辑摘要
 
(未显示2个用户的33个中间版本)
第1行: 第1行:
mw.loader.load( 'https://cdn.staticfile.org/twitter-bootstrap/4.5.0/js/bootstrap.min.js', 'text/javascript');
/**
/**
  * Collapsible tables *********************************************************
  * Collapsible tables *********************************************************
第66行: 第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 );
第92行: 第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");
        });
    });
});
///////结束////////

导航菜单