Thread:Yustus/@comment-3974211-20170611091555/@comment-28977071-20170723182809

Here is a functional version for a multi-champ page. Same sources as above from my sandbox:

template plus javascript

Anyway, the current code sample should be fully applicable for live wiki. Let me know if it satisfies your needs.

Known issues:


 * The IDs are maybe unnecessarily long now. It'd be possible to mark the entire container with the specific champ's data with ID, instead of marking every single stat. However, this approach has advantage of allowing the distinct stats to be more independently scattered over the layout. Lemme know if you'd like to use the 'marked container' version.


 * The usage of the champ's name violates the HTML naming conventions for ID (the spaces). I circumvented that for myself with the implicit JQuery selectors, but MediaWiki could be sad. A possible solution'd be to use a champ's identifier differing from the champ's name, e.g.:

→ "MegaGnar" → "Mega Gnar"

Going against globally accepted conventions is usually a bad idea. But such a change'd of course have a bit more global impact on the wiki, hence I'm only giving a warning (requiring to swap some for  in the worst case) without doing any kind of massive wiki templates' refactoring. I'd personally prefer elimination of spacing from champs' identifiers.