Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.09 KB

mydoc_adding_tooltips.md

File metadata and controls

27 lines (21 loc) · 1.09 KB
title tags keywords last_updated summary sidebar permalink folder
Tooltips
formatting
popovers, tooltips, user interface text, glossaries, definitions
July 3, 2016
You can add tooltips to any word, such as an acronym or specialized term. Tooltips work well for glossary definitions, because you don't have to keep repeating the definition, nor do you assume the reader already knows the word's meaning.
mydoc_sidebar
mydoc_adding_tooltips.html
mydoc

Creating tooltips

Because this theme is built on Bootstrap, you can simply use a specific attribute on an element to insert a tooltip.

Suppose you have a glossary.yml file inside your _data folder. You could pull in that glossary definition like this:

{% raw %}

<a href="#" data-toggle="tooltip" data-original-title="{{site.data.glossary.jekyll_platform}}">Jekyll</a> is my favorite tool for building websites.

{% endraw %}

This renders to the following:

Jekyll is my favorite tool for building websites.

{% include links.html %}