User:Kaydeethree/Implementing JS tooltips
Jump to navigation
Jump to search
All of of the code is in MediaWiki:Common.js
- copy from
// See Help:Tooltips
to// collapsible tables
- data on the article you want in a tooltip needs to be wrapped in a <div class="tooltip-content"></div>
- See {{itemtip}}, {{abilitytip}} for actual tooltips -- the whole template output is wrapped in the div, {{npcbox}} (the js tooltip is in a hidden div near the end of the template), etc...
- links to the article that you want tooltiped need to be formatted like [[Article link|<span class="ajaxttlink">Link display</span>]]
- We use DefaultLinks to automate some of the formatted links - items, achievements, spells (but NOT NPCs) will turn a simple [[Wiki link]] into something formatted.