User:Pathoschild/Scripts/AJAX transclusion table
The AJAX transclusion table script adds a "[show]" link in the first cell of every row in tables with the "attable" class. Clicking the link will display the linked page below (see screenshots at right). No show/hide link will be shown in rows that don't contain a link, like headings.
Installation
edit- Copy the following code to your global.js page (for all wikis) or your common.js page (for Meta only).
/** * Ajax transclusion table adds dynamic content loading to tables with class="attable". * @see https://meta.wikimedia.org/wiki/Ajax_transclusion_table * @update-token [[File:Pathoschild/ajaxtransclusiontable.js]] */ mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxtransclusiontable.js');
- Refresh your browser to reload the JavaScript. (In Chrome or Firefox, press [CTRL] and [R] at the same time.)
See also
edit- Usage
- Source code
- Template:Welcome/attable - example of use
- Collapsible Tables