MediaWiki:Common.js: Difference between revisions

From Official Kynseed Wiki from PixelCount Studios
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
jQuery(document).ready(function() {
jQuery(document).ready(function() {
jQuery('[data-spoiler]').on('click', function() {
jQuery('[data-spoiler]').on('click', function() {
$(this).hide();
$('[data-spoiler-body="' + $(this).attr('data-spoiler') + '"]').show();
$('[data-spoiler-body="' + $(this).attr('data-spoiler') + '"]').show();
});
});
});
});

Revision as of 11:55, 7 December 2022

/* Any JavaScript here will be loaded for all users on every page load. */

//function ShowSpoiler(section) {
//document.getElementById(section + 'Spoiler').style.display = 'block';
//}

jQuery(document).ready(function() {
	jQuery('[data-spoiler]').on('click', function() {
$(this).hide();
		$('[data-spoiler-body="' + $(this).attr('data-spoiler') + '"]').show();
	});
});