MediaWiki:Common.js

From Project: Gorgon Wiki
Revision as of 12:03, 23 September 2014 by Gorgonzola (talk | contribs)
Jump to: navigation, search
/* Any JavaScript here will be loaded for all users on every page load. */

// Gorgonzola: Used by [[Template:Spoilers]] (reusing classes from <spoiler> extension)
$('.spoilers-button').toggle(function() {
  $(this).parents('.spoilers').find('.spoilers-body').show();
  $(this).children('.spoilers-show').hide();
  $(this).children('.spoilers-hide').show();
}, function() {
  $(this).parents('.spoilers').find('.spoilers-body').hide();
  $(this).children('.spoilers-show').show();
  $(this).children('.spoilers-hide').hide();
});