MediaWiki:Common.js: Difference between revisions
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() { | ||
alert(' | alert($(this).attr('data-spoiler')); | ||
}); | }); | ||
}); | }); |
Revision as of 11:53, 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() { alert($(this).attr('data-spoiler')); }); });