GetBible Tooltips is an intuitive and lightweight JavaScript solution for embedding Bible scripture tooltips into your website. By simply adding the `getBible` class to any element on your webpage, you can enable users to see the full scripture text in a tooltip when they hover over a reference.
## How to Add GetBible Tooltips to Your Website
1.**Include the GetBible JavaScript File:**
First, include the GetBible script in the `<head>` section of your HTML document:
```html
<!-- Include the GetBible tooltips script from jsDelivr CDN -->
In the body of your HTML document, apply the `getBible` class to any element that should display a scripture tooltip. Here is an example using a `ul` list:
```html
<ul>
<liclass="getBible">John 3:16</li>
<liclass="getBible">1 John 3:16-19,22</li>
<!-- Add more elements as needed -->
</ul>
```
For a detailed example, check out the [basic usage example](https://git.vdm.dev/getBible/loader/src/branch/master/example/basic.html) in the `getbible/loader` repository.
## Utilizing Data Attributes
Data attributes allow you to customize the behavior and display of the scripture tooltips.
-`data-translation`: Specify the Bible translations to use, separated by semicolons (e.g., `kjv;aov`). The tooltip will fetch the scripture from each translation listed.
-`data-show-translation`: Set to `1` to display the translation name in the tooltip.
-`data-show-abbreviation`: Set to `1` to display the abbreviation of the translation in the tooltip.
-`data-show-language`: Set to `1` to display the language of the translation in the tooltip.
In the example above, the tooltip for this list item will show text from both the King James Version (KJV) and another version abbreviated as AOV. It will also display the translation name and language for each scripture reference.
[Here you can view all the files of the various translations we use to parse each reference in their respective languages](https://git.vdm.dev/getBible/librarian/src/branch/master/src/getbible/data).
Should you see room for improvement to these, please open an issue at our [support desk](https://git.vdm.dev/getBible/support/issues), we welcome any help to make this work even better.