Updated 'pages/formatting/adding_tooltips.md' via CloudCannon

This commit is contained in:
Tom Johnson 2015-05-02 15:04:50 -07:00
parent a44149986a
commit dde23379c8

View File

@ -1,19 +1,21 @@
---
title: Adding tooltips
permalink: /adding_tooltips/
---
* * *
You can add tooltips to your content. Because this theme is built on Bootstrap, you can simply use a specific attribute on an element to insert a tooltip.
title: Adding tooltips
## permalink: /adding_tooltips/
You can add tooltips to your content. Because this theme is built on Bootstrap, you can simply use a specific attribute on an element to insert a tooltip.  test...
Suppose you have a glossary.yml file inside your _data folder. You could pull in that glossary definition like this:
{% raw %}
```html
<a href="#" data-toggle="tooltip" data-original-title="{{site.data.glossary.jekyll_platform}}">Jekyll</a> is my favorite tool for building websites.</a>
<!--|%%|%7B%25%20raw%20%25%7D|%%|-->
```
{% endraw %}
<a href="#" data-toggle="tooltip" data-original-title="<!--|%%|%7B%7Bsite.data.glossary.jekyll_platform%7D%7D|%%|-->">Jekyll</a> is my favorite tool for building websites.</a>
```
<!--|%%|%7B%25%20endraw%20%25%7D|%%|-->
This renders to the following:
<a href="#" data-toggle="tooltip" data-original-title="{{site.data.glossary.jekyll_platform}}">Jekyll</a> is my favorite tool for building websites.</a>
<a data-toggle="tooltip" data-original-title="<!--|%%|%7B%7Bsite.data.glossary.jekyll_platform%7D%7D|%%|-->" href="#">Jekyll</a> is my favorite tool for building websites.