Template:Tooltip: Difference between revisions
Jump to navigation
Jump to search
(Typing the display text, *then* the tooltip seems more intuitive to me. Also added the ability to hide the dashed underline if required.) |
m (Consistency in the example.) |
||
Line 15: | Line 15: | ||
===Examples=== | ===Examples=== | ||
<code><nowiki>{{Tooltip|Display text|Hover text}}</nowiki></code><br> | <code><nowiki>{{Tooltip|Display text|Hover text}}</nowiki></code><br> | ||
{{Tooltip|Display text| | {{Tooltip|Display text|Hover text}} | ||
<code><nowiki>{{Tooltip|Display text with no underline|Hover text|nodash}}</nowiki></code> (Not recommended)<br> | <code><nowiki>{{Tooltip|Display text with no underline|Hover text|nodash}}</nowiki></code> (Not recommended)<br> |
Latest revision as of 17:00, 6 April 2024
Hover your cursor over me!
Use this to make a tooltip that displays when a user hovers their mouse cursor over a string of text. The resulting text will have a dotted underline to indicate that it contains a tooltip.
Usage
{{Tooltip|display text|hover text}}
- Replace
display text
with whatever text you want to display initially. - Replace
hover text
with text that you want to be displayed when hovering the cursor over the affected string. - Add a
nodash
ornodash=y
argument to hide the dashed underline if required. Not recommended in most cases.
Examples
{{Tooltip|Display text|Hover text}}
Display text
{{Tooltip|Display text with no underline|Hover text|nodash}}
(Not recommended)
Display text with no underline