问题
This person has managed to integrate a script (from here http://www.javascripttoolbox.com/lib/table/documentation.php) into their mediawiki.
See: http://offene-naturfuehrer.de/web/Kategorie:Filtertabellen
I don't understand how they've done it!
The original script to create filterable tables is linked to on that page. Yet I have no idea how they've utilized it as they've not called it in the header..
I really want to use a filterable table like this in my mediawiki site. What do I do?!
回答1:
They have added some lines of code (search for Table Filter/Sort
, far below) to the MediaWiki:Common.js file, from where they load the script at MediaWiki:SortTableFilter.js. You don't see it loaded in the DOM because they've used jQuery.getScript
, which loads it via ajax and eval
s then.
来源:https://stackoverflow.com/questions/13714490/implementing-filterable-table-script-in-mediawiki