MediaWiki:Common.js: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
var tabNames = new Array("Tab1","Tab2","Tab3"); |
var tabNames = new Array("Tab1","Tab2","Tab3"); |
||
tabObj = document.getElementById(tabNames[tabNo]); |
tabObj = document.getElementById(tabNames[tabNo]); |
||
if(currentTab |
if(currentTab!=tabNo){ |
||
if(inOut==0){ |
|||
tabObj.style.background='#EAEAC3'; |
|||
} else { |
|||
tabObj.style.background='#F9F9E3'; |
|||
} |
|||
} else { |
|||
if(inOut==0){ |
if(inOut==0){ |
||
tabObj.style.background='#DADAA3'; |
tabObj.style.background='#DADAA3'; |
Revision as of 17:17, 12 November 2007
/* Any JavaScript here will be loaded for all users on every page load. */
var currentTab = 0;
function showHideTabs(tabNo){
var tableNames = new Array("table1","table2","table3");
var tabNames = new Array("Tab1","Tab2","Tab3");
for (var i = 0; i < 3; i++) {
if(i==tabNo){
document.getElementById(tableNames[i]).style.display='';
} else {
document.getElementById(tableNames[i]).style.display='none';
document.getElementById(tabNames[i]).style.background='#E9E9C3';
}
}
currentTab = tabNo;
}
function changeColor(tabNo,inOut){
var tabNames = new Array("Tab1","Tab2","Tab3");
tabObj = document.getElementById(tabNames[tabNo]);
if(currentTab!=tabNo){
if(inOut==0){
tabObj.style.background='#DADAA3';
} else {
tabObj.style.background='#E9E9C3';
}
}
}