Predefinição:Tooltip
Esta predefinição usa Lua: |
This template allows a Tooltip to be associated with a particular word or phrase, that is when the mouse (or other pointing device) is over the target word or phrase, another word or phrase pops up in a box.
Usage
editar:({{Tooltip|J. F. R.|James Ford Rhodes}})
Gives...
- (J. F. R.)
And
Many of these portraits bore inscriptions, the most famous of which was Turgot's line, “{{Tooltip|Eripuit fulmen coelo sceptrumque tyrannis.|He snatched the lightning from the skies and the scepter from the tyrants.}}”
Gives...
Many of these portraits bore inscriptions, the most famous of which was Turgot's line, “Eripuit fulmen coelo sceptrumque tyrannis.”
Parameters
editarNamed parameters are available
- first parameter $1, is named parameter target, ie.
target = J. F. R.
- second parameter $2, is named parameter texttip, ie.
texttip = James Ford Rhodes
{{Tooltip|target = J. F. R.|texttip = James Ford Rhodes}}
- J. F. R.
Applications
editarIn Wikisource, this can be used to provide translations of foreign phrases in source material. These translations will be clearly differentiated from the source material itself since they pop up in a box. Another use would be to provide the author's full name when the source only provides initials, as in many 1911 Encyclopædia Britannica articles.
Notes
editar- This template is being used as the underlying template for formatting other templates, so if changes are made, especially to parameters, please check their functionality. Linked templates
- The
texttip
parameter is embedded as the value for atitle
HTML attribute, and as such needs to be surrounded by quotes, per the XHTML requirements. Apostrophes have been added to get the tip popup effect.
A documentação acima é transcluída de Predefinição:Tooltip/doc. (editar | histórico) Editores podem experimentar nas páginas de teste (criar | espelhar) e de exemplos para testes (criar) desta predefinição. Por favor adicione categorias à subpágina /doc. Subpáginas desta predefinição. |