MediaWiki:Common.js:修订间差异
跳到导航
跳到搜索
无编辑摘要 |
|||
第91行: | 第91行: | ||
mw.hook( 'wikipage.content' ).add( createCollapseButtons ); | mw.hook( 'wikipage.content' ).add( createCollapseButtons ); | ||
/////分页tab/////// | |||
$(".tab").each(function(index) { | |||
$(this).click(function(e) { | |||
triggletab(); | |||
triigletabcontent(); | |||
$(this).toggleClass("active"); | |||
$(".tab-c") | |||
.eq(index) | |||
.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"); | |||
}); | |||
} | |||
///////结束//////// |