MediaWiki:Common.js:修订间差异

跳到导航 跳到搜索
删除582字节 、​ 2022年5月4日 (星期三)
无编辑摘要
无编辑摘要
无编辑摘要
 
(未显示2个用户的24个中间版本)
第1行: 第1行:
$(document).ready(function() {
    setInterval('AutoScroll("#scrollDiv")',5000);
//图片载入效果
    $('img').on('appear', function(e){
        var that = $(this);
        that.css('opacity',0);
        setTimeout(function(){
            that.css('transition','opacity 1s').css('opacity',1);
        }, 1);
    });
//End of 图片载入效果
});
阅读更多:https://zh.kcwiki.org/wiki/MediaWiki:Common.js
本文引自kcwiki舰娘百科(https://zh.kcwiki.moe/),文字内容遵守CC BY-NC-SA协议。
/**
/**
  * Collapsible tables *********************************************************
  * Collapsible tables *********************************************************
第109行: 第93行:


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

导航菜单