ແມ່ແບບ:Tooltip
Page ແມ່ແບບ:Tooltip/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "ຂໍ້ຄວາມວິກິ").Script error: No such module "MultiReplace".
| ມີການໃຊ້ແມ່ແບບນີ້ຫຼາຍພັນໜ້າ ແລະ ການແກ້ໄຂອາດເຮັດໃຫ້ເກີດຜົນກະທົບ ຫຼື ສັງເກດເຫັນໄດ້ ຄວນທົດສອບການປ່ຽນແປງໃນກ່ອງຊາຍ ຫຼື ໜ້າທົດສອບ ຫຼື ໃນຍ່ອຍຜູ້ໃຊ້ຂອງທ່ານເອງນອກຈາກນີ້ທ່ານຍັງສາມາດສົນທະນາກ່ຽວກັບການແກ້ໄຂແມ່ແບບໄດ້ທີ່ສົນທະນາ ກ່ອນທີ່ຈະນຳໄປໃຊ້ |
| ແມ່ແບບນີ້ໃຊ້ລູອາ |
| ແມ່ແບບນີ້ໃຊ້ TemplateStyles: |
This template may be used to generate a tooltip when hovering over marked text.
Note: this template is § not to be used for expanding initialisms or acronyms; see template {{abbr}} for that instead. See ແມ່ແບບ:Slink for more details on access limitations for mobile and screen reader users.
Usage
[ດັດແກ້]{{Tooltip|inline text|hover text}}{{Tooltip|inline text|hover text|dotted=no|link=yes|class=...|style=...|id=...}}
When not to use
[ດັດແກ້]Abbreviations – The {{Tooltip}} template is not intended for use with abbreviations, including acronyms and initialisms; use template {{abbr}} for that instead.
Body text – The tooltip template should not be used within the body text of an article if possible (see ).
As footnotes – Tooltips are not a substitute for footnotes. They are intended to be used for navigational and other secondary features where space is limited. See Template:Glossary link or Template:Cite book/doc#Usage for practical examples.
In citations – Tooltips cannot be used inside citation templates. If you're tempted to put a tooltip in a citation, it may be better to place a plaintext note after the citation template but before the closing </ref> tag, or use a nested footnote.
Parameters
[ດັດແກ້]There are two required positional parameters, and five optional named parameters:
|1=– the term to be explained; displays as text. Wiki markup is allowed but works more consistently when wrapping the template, see below for linking examples.|2=– the tooltip/pop-up (no wiki or HTML markup allowed). The popup is created by an HTMLtitle=attribute, so it cannot contain HTML (or markup that resolves to HTML when rendered). This includes simple things like''italics''.|dotted=– set to ແມ່ແບບ:Pval to remove dotted underline decoration (default: use dotted underline)|link=– set to ແມ່ແບບ:Pval to link the tooltip to the value in param ແມ່ແບບ:Pval (default: tooltip is unlinked)
These three parameters take the standard values as defined by HTML and CSS:
|class=– one or more CSS classes (space-separated, enclosed in quotes)|id=– an HTML ID must be unique on the entire page.|style=– CSS to apply to the displayed text (no effect on tooltip/popup). Any style values with embedded blanks must be single-quoted, e.g.|style=font-family: 'Times New Roman', serif;
Examples
[ດັດແກ້]Template data
[ດັດແກ້]ຂໍ້ມູນແມ່ແບບສຳລັບ Tooltip
A pop-up tooltip displayed on mouse-over.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Term | 1 | Rendered in-line as normal text | Line | required |
| Tooltip | 2 | Shows as a pop-up, mouse-over tooltip | String | required |
| Link | link | set to 'yes' to link the term to the article specified by Term
| Boolean | optional |
| Dotted | dotted | applies the specified CSS directives to the content of parameter 1
| Boolean | optional |
| Style | style | applies the specified CSS directives to the content of parameter 1 | String | optional |
| Class | class | Adds one or more CSS classes, separated by a blank | String | optional |
| ID | id | Adds an HTML id (must be unique in the page) | String | optional |
Notes
[ດັດແກ້]- This template is not available in the mobile view of Wikipedia, which lacks the hover feature. As of 2025, more English Wikipedia page views occur on mobile than on desktop browsers.
- Screen readers often have difficulty with plain hover pop-up text.