MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 3: Line 3:
$('.spoiler-content')
$('.spoiler-content')
.off('click') // in case this code is loaded twice
.off('click') // in case this code is loaded twice
.addClass( 'hide')
.on('click', function(e){
.on('click', function(e){
$(this).toggleClass('hide');
$(this).toggleClass('hide');