<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ATooltip%2Fdoc</id>
	<title>Template:Tooltip/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ATooltip%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Tooltip/doc&amp;action=history"/>
	<updated>2026-04-30T16:30:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Template:Tooltip/doc&amp;diff=358&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;{{Documentation|Template:Tooltip}} Template:Tooltip and Template:Tooltip text are templates is for generating clickable tooltips to show additional information. They are to be used together.  These tooltips &#039;&#039;&#039;require JavaScript&#039;&#039;&#039;, so should only be used for non-essential additional information only. They will not show at all in the mobile skin or if the user has JavaScript disabled. The script powering these tooltips is located at MediaWiki:Gadget-tooltips.js...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Tooltip/doc&amp;diff=358&amp;oldid=prev"/>
		<updated>2024-10-11T21:02:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation|Template:Tooltip}} &lt;a href=&quot;/w/Template:Tooltip&quot; title=&quot;Template:Tooltip&quot;&gt;Template:Tooltip&lt;/a&gt; and &lt;a href=&quot;/w/Template:Tooltip_text&quot; title=&quot;Template:Tooltip text&quot;&gt;Template:Tooltip text&lt;/a&gt; are templates is for generating clickable tooltips to show additional information. They are to be used together.  These tooltips &amp;#039;&amp;#039;&amp;#039;require JavaScript&amp;#039;&amp;#039;&amp;#039;, so should only be used for non-essential additional information only. They will not show at all in the mobile skin or if the user has JavaScript disabled. The script powering these tooltips is located at MediaWiki:Gadget-tooltips.js...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation|Template:Tooltip}}&lt;br /&gt;
[[Template:Tooltip]] and [[Template:Tooltip text]] are templates is for generating clickable tooltips to show additional information. They are to be used together.&lt;br /&gt;
&lt;br /&gt;
These tooltips &amp;#039;&amp;#039;&amp;#039;require JavaScript&amp;#039;&amp;#039;&amp;#039;, so should only be used for non-essential additional information only. They will not show at all in the mobile skin or if the user has JavaScript disabled. The script powering these tooltips is located at [[MediaWiki:Gadget-tooltips.js]].&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Tooltip usage is much like references. A small snippet is placed in the text to define the position of the tooltip, and the full tooltip text is specified elsewhere.&lt;br /&gt;
&lt;br /&gt;
The tooltip position is specified by [[Template:Tooltip]]. The tooltip content is specified by [[Template:Tooltip text]]. The two are linked together by a name. Each {{t|tooltip text}} must have a unique name, but many {{t|tooltip}}s can refer to that name, to have the same tooltip appear in multiple places. The name is not displayed visibly to the reader. If a name is not specified for a template, a script error is thrown.&lt;br /&gt;
&lt;br /&gt;
The content of a tooltip can be any normal wikicode. &amp;#039;&amp;#039;&amp;#039;Remeber to escape | in tables!&amp;#039;&amp;#039;&amp;#039; (use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or HTML notation &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; etc. Be aware that due to the nature of the construction of tooltips (within a div tag), whitespace (including additional newlines) will be collapsed to a single space. Use br or p tags to construct multiple paragraphs.&lt;br /&gt;
&lt;br /&gt;
===Basic===&lt;br /&gt;
The most basic usage is to use the templates with minimal inputs. The required inputs are:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Tooltip|tooltip name}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = tooltip name&lt;br /&gt;
|content = tooltip content&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|example1}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = example1&lt;br /&gt;
|content = Example tooltip content&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|example1}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = example1&lt;br /&gt;
|content = Example tooltip content&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Advanced===&lt;br /&gt;
The tooltip templates have a few additional parameters, which come with defaults:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Tooltip|name|clickable text; default ?}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = tooltip name&lt;br /&gt;
|content = tooltip content&lt;br /&gt;
|arrow = whether to show an arrow to point at the click point; default yes&lt;br /&gt;
|arrowsize = width and height of the arrow (height = 2*width); default 10&lt;br /&gt;
|limitwidth = automatically limit width of the tooltip to within content; default yes&lt;br /&gt;
|style = additional in-line css to add to the tooltip; default none&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Additional specification&lt;br /&gt;
:&amp;#039;&amp;#039;limitwidth&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;limitwidth&amp;#039;&amp;#039; will automatically apply a maximum width to the tooltip, to keep it within content.&lt;br /&gt;
&lt;br /&gt;
Without &amp;#039;&amp;#039;limitwidth&amp;#039;&amp;#039;, the default maximum width is 80% of the entire browser window (the body tag). With &amp;#039;&amp;#039;limitwidth&amp;#039;&amp;#039; enabled, it is limited to the width of the (larger) gap between the click point and the edge of content (the tag with id=mw-content-text).&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;style&amp;#039;&amp;#039;&lt;br /&gt;
The following styles are set during script runtime so can&amp;#039;t be used by this parameter:&lt;br /&gt;
* left&lt;br /&gt;
* right&lt;br /&gt;
* top&lt;br /&gt;
* max-width (if using &amp;#039;&amp;#039;limitwidth&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
===Module===&lt;br /&gt;
To use tooltips within a module, require [[Module:Tooltip]]. The &amp;lt;code&amp;gt;_span&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_div&amp;lt;/code&amp;gt; functions are available to use to generate the clickable span and the tooltip content, respectively. They accept the same parameters as the templates, in a table. The returned span/div are mw.html objects.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
;alt text&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|altclick|click here!}}&lt;br /&gt;
&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = altclick&lt;br /&gt;
|content = Example tooltip content for alt click&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|altclick|click here!}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = altclick&lt;br /&gt;
|content = Example tooltip content for alt click&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;No arrow&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|noarrow}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = noarrow&lt;br /&gt;
|content = Example tooltip content with no arrow&lt;br /&gt;
|arrow = no&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|noarrow}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = noarrow&lt;br /&gt;
|content = Example tooltip content with no arrow&lt;br /&gt;
|arrow = no&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Larger arrow&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|largearrow}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = largearrow&lt;br /&gt;
|content = Example tooltip content with a bigger arrow&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and more lines in the box&lt;br /&gt;
|arrowsize = 20&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|largearrow}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = largearrow&lt;br /&gt;
|content = Example tooltip content with a bigger arrow&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and more lines in the box&lt;br /&gt;
|arrowsize = 20&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Limited width comparison&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|limitedwidth}}&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|unlimitedwidth}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = limitedwidth&lt;br /&gt;
|content = Example tooltip with limited width&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Vestibulum sit amet fringilla diam. Phasellus ac magna sapien. Suspendisse potenti. Duis id metus elementum, sagittis massa iaculis, imperdiet sem. Maecenas mollis, massa vitae vehicula mollis, eros mauris posuere mi, vel malesuada tortor lectus a lectus. Aliquam suscipit dignissim consequat. Vestibulum in ipsum orci. Vivamus quis dolor in purus viverra gravida eu quis ipsum.&lt;br /&gt;
}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = unlimitedwidth&lt;br /&gt;
|limitwidth = no&lt;br /&gt;
|content = Example tooltip with unlimited width&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Vestibulum sit amet fringilla diam. Phasellus ac magna sapien. Suspendisse potenti. Duis id metus elementum, sagittis massa iaculis, imperdiet sem. Maecenas mollis, massa vitae vehicula mollis, eros mauris posuere mi, vel malesuada tortor lectus a lectus. Aliquam suscipit dignissim consequat. Vestibulum in ipsum orci. Vivamus quis dolor in purus viverra gravida eu quis ipsum.&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|limitedwidth}}&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|unlimitedwidth}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = limitedwidth&lt;br /&gt;
|content = Example tooltip with limited width&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Vestibulum sit amet fringilla diam. Phasellus ac magna sapien. Suspendisse potenti. Duis id metus elementum, sagittis massa iaculis, imperdiet sem. Maecenas mollis, massa vitae vehicula mollis, eros mauris posuere mi, vel malesuada tortor lectus a lectus. Aliquam suscipit dignissim consequat. Vestibulum in ipsum orci. Vivamus quis dolor in purus viverra gravida eu quis ipsum.&lt;br /&gt;
}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = unlimitedwidth&lt;br /&gt;
|limitwidth = no&lt;br /&gt;
|content = Example tooltip with unlimited width&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Vestibulum sit amet fringilla diam. Phasellus ac magna sapien. Suspendisse potenti. Duis id metus elementum, sagittis massa iaculis, imperdiet sem. Maecenas mollis, massa vitae vehicula mollis, eros mauris posuere mi, vel malesuada tortor lectus a lectus. Aliquam suscipit dignissim consequat. Vestibulum in ipsum orci. Vivamus quis dolor in purus viverra gravida eu quis ipsum.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Style&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|style}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = style&lt;br /&gt;
|content = Example tooltip content with style (background colour)&lt;br /&gt;
|style = background:lightgreen;&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|style}}&lt;br /&gt;
{{Tooltip text&lt;br /&gt;
|name = style&lt;br /&gt;
|content = Example tooltip content with style (background colour)&lt;br /&gt;
|style = background:lightgreen;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Tables&lt;br /&gt;
&amp;lt;pre&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|table}}&lt;br /&gt;
{{tooltip text|name=table|content=Table test&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable align-right-2&amp;quot; style=&amp;quot;margin: 0 auto;&amp;quot;&lt;br /&gt;
! Item&lt;br /&gt;
! Price sold at&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{plink|Shears}}&lt;br /&gt;
{{!}} 1&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{plink|Knife}}&lt;br /&gt;
{{!}} 7&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{plink|Bucket}}&lt;br /&gt;
{{!}} 2&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{{Tooltip|table}}&lt;br /&gt;
{{tooltip text|name=table|content=Table test&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable align-right-2&amp;quot; style=&amp;quot;margin: 0 auto;&amp;quot;&lt;br /&gt;
! Item&lt;br /&gt;
! Price sold at&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{plink|Shears}}&lt;br /&gt;
{{!}} 1&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{plink|Knife}}&lt;br /&gt;
{{!}} 7&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{plink|Bucket}}&lt;br /&gt;
{{!}} 2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Formatting templates]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>