MediaWiki:Common.js: Difference between revisions

From ANZUS Wiki
Jump to navigation Jump to search
m (Undo revision 331 by AstridFarland (talk))
Tags: Undo Reverted
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
$('.upgrade-content').hide();
$('.upgrade-content').hide();
$('#' + id + '.upgrade-content').show();
$('#' + id + '.upgrade-content').show();
});
});
});
/*Accordions*/
mw.loader.using(['jquery'], function() {
$(document).ready(function(){
$('.accordion-button').click(function(e){
$(this).toggleClass('active-accordion');
var panel = $(this).next();
$(panel).toggle();
});  
});  
});
});
});
});

Latest revision as of 14:51, 12 June 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){
			$('.upgrade-icon').removeClass('active-icon');
			$(this).toggleClass('active-icon');
				var id = $(this).attr('id');
			$('.upgrade-content').hide();
			$('#' + id + '.upgrade-content').show();
		}); 
	});
});

/*Accordions*/
mw.loader.using(['jquery'], function() {
	$(document).ready(function(){
		$('.accordion-button').click(function(e){
			$(this).toggleClass('active-accordion');
				var panel = $(this).next();
			$(panel).toggle();
		}); 
	});
});