MediaWiki:TemplateDatabox.js: Difference between revisions
Appropedia>Sophivorus No edit summary |
m 1 revision imported |
(No difference)
| |
Latest revision as of 16:57, 3 December 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 );