MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
spoiler js code |
m hoverzoom js test Tag: Reverted |
||
| Line 21: | Line 21: | ||
}); | }); | ||
// [[Category:Scripts]] | // [[Category:Scripts]] | ||
$('.hoverzoom img').hover(function () { | |||
var full = $(this).closest('a').attr('href'); | |||
// show popup with full image | |||
}); | |||
Revision as of 05:48, 19 October 2026
/* Any JavaScript here will be loaded for all users on every page load. */
/*
Template:Spoiler on dev.miraheze.org
*/
$(function(){
//spoiler block behavior
$('.spoiler').click(function(){
$(this).toggleClass('off');
});
// spoiler button behavior
$('#spoilerbtn').text('Show all spoilers');
$('#spoilerbtn').click(function(){
$(this).toggleClass('hide');
$('.spoiler').toggleClass('showall');
if ($(this).is('.hide')){ $(this).text('Hide all spoilers'); }
else { $(this).text('Show all spoilers'); }
});
});
// [[Category:Scripts]]
$('.hoverzoom img').hover(function () {
var full = $(this).closest('a').attr('href');
// show popup with full image
});