MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: importScript('Infoboxtabs.js');") |
mNo edit summary |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
function showImage(imageId) { | |||
var images = document.getElementsByClassName('image-content'); | |||
for (var i = 0; i < images.length; i++) { | |||
images[i].style.display = 'none'; | |||
} | |||
document.getElementById(imageId).style.display = 'block'; | |||
} |
Revision as of 13:52, 14 January 2024
/* Any JavaScript here will be loaded for all users on every page load. */ function showImage(imageId) { var images = document.getElementsByClassName('image-content'); for (var i = 0; i < images.length; i++) { images[i].style.display = 'none'; } document.getElementById(imageId).style.display = 'block'; }