MediaWiki:Common.js: Difference between revisions

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