MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
m (Undo revision 331 by AstridFarland (talk)) Tags: Undo Reverted |
(Undo revision 332 by AstridFarland (talk)) Tag: Undo |
||
Line 5: | Line 5: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$('.upgrade-icon').click(function(e){ | $('.upgrade-icon').click(function(e){ | ||
$( | $(this).siblings().removeClass('active-icon'); | ||
$(this).toggleClass('active-icon'); | $(this).toggleClass('active-icon'); | ||
var id = $(this).attr('id'); | var id = $(this).attr('id'); | ||
$('.upgrade-content').hide(); | $('#' + id + '.upgrade-content').siblings().hide(); | ||
$('#' + id + '.upgrade-content').show(); | $('#' + id + '.upgrade-content').show(); | ||
}); | }); | ||
}); | }); | ||
}); | }); |
Revision as of 20:00, 21 May 2024
/* Any JavaScript here will be loaded for all users on every page load. */ /*Upgrade Icon Menu*/ mw.loader.using(['jquery'], function() { $(document).ready(function(){ $('.upgrade-icon').click(function(e){ $(this).siblings().removeClass('active-icon'); $(this).toggleClass('active-icon'); var id = $(this).attr('id'); $('#' + id + '.upgrade-content').siblings().hide(); $('#' + id + '.upgrade-content').show(); }); }); });