AjaxTooltips

<includeonly>
AjaxTooltips displays tooltips when you hover over links. The tooltips' contents are taken from the link's page. The difference between this script and LinkPreview is only the contents inside are displayed.
== ==
=== Step 1: Import the script ===
=== Step 2: Apply class="tooltip-content" ===
For the contents you want to display as the tooltip, put it inside .
* The contents can be on the page, or inside a template.
=== Step 3: Create the tooltip template ===
Create the page Template:Ajaxtt with the following code:
[[{{{1}}}|{{{2|{{{1|}}}}}}]]
== ==
To make a link with tooltip, use {{Ajaxtt|page|title}} on any page, where:
* page is the link to the page.
* title is the displayed text of the link (optional).
== Error message customization ==
When the page of the link does not have content for the tooltip, the tooltip will be displayed as "This target either has no tooltip or was not intended to have one". You can customize that message with this CSS:
.ajaxtt-error {
 background-color: var(--theme-accent-color);
 color: var(--theme-page-text-color);
 padding: 5px;
}
== ==
* LinkPreview
* Tooltips - a more customizable way of using tooltips.