MediaWiki:TemplateDatabox.js: Difference between revisions
Appropedia>Sophivorus No edit summary |
(No difference)
|
Revision as of 10:12, 18 January 2024
/** * This script interacts with [[Template:Databox]] * [[Category:Template script pages]] */ var TemplateDatabox = { init: function () { $( '#mw-content-text' ).find( '.databox caption' ).on( 'click', TemplateDatabox.toggle ); }, toggle: function ( event ) { if ( event.target.tagName === 'A' ) { return; } $( this ).next( 'tbody' ).toggle(); } }; $( TemplateDatabox.init );