WARCRAFT FOREVER / DEVELOPERS
Tooltips
Add talent, item, and recipe cards to links on your site.
Use a separate script to show the site’s familiar cards on your own links. Only elements with data-wf-tooltip are affected. A hover or keyboard focus loads the card; a tap opens a detail dialog with an Open link action. Link destinations and ordinary click behavior stay yours.
Copy and paste
<a href="https://warcraftforever.com/talents/paladin/"
data-wf-tooltip="talent:paladin:paladin-holy-divine-strength"
data-wf-rank="3">Divine Strength</a>
<a href="https://warcraftforever.com/items/118"
data-wf-tooltip="item:118">Minor Healing Potion</a>
<a href="https://warcraftforever.com/spells/2149"
data-wf-tooltip="recipe:2149">Handstitched Leather Boots</a>
<script src="https://warcraftforever.com/tooltips/latest.js"></script>
<script>
const cards = WarcraftForever.Tooltips.attach(document);
</script>Try the live demo with current and archived talents, items, recipes, German and French labels, added links, and a detach control. Include the talent calculator script separately when you also need an editable build.
Targets and options
| Setting | Use |
|---|---|
data-wf-tooltip | talent:<class>:<stable talent ID>, item:<ID>, or recipe:<ID>. |
data-wf-rank | Talent rank, default 1. Use 0 to show the unlearned and next-rank text. |
data-wf-revision | Archived talent layout revision; omit for the current revision. |
locale | Optional attach(root, { locale: 'de' }). Without it, the script uses a supported browser language or English. |
channel | Optional published professions channel ID; the default channel is used otherwise. |
attach(document) also accepts an element root. It watches marked elements added later inside that root and returns open(element) and destroy(). Use separate roots for separate language or channel choices. Unknown cards disappear quietly while the underlying link remains available. Item and recipe coverage follows our published professions data; it does not include every item or spell in the game.