Help › Website plugin 1.0

Drawing the links yourself

The tooltip works for any link on the page that is marked as a scripture reference, whoever made it. A page that draws its own links (from React or a template, say) can skip the scanning and still get the tooltip.

The markup

<a class="st-ref" href="…" data-st-ref="John.3.16" data-st-text="John 3:16">John 3:16</a>
AttributeHolds
class="st-ref"Marks the link as a scripture reference.
data-st-refThe passage in OSIS form: John.3.16, or Rom.5.8-Rom.5.10 for a range.
data-st-textThe reference as written.
data-st-keyOptional: your own ID for the link, so a visitor's translation choice follows it.

Starting the plugin

Call run as usual. Links you draw yourself get their tooltips wherever they are on the page, inside the areas you named or not, and the scan never changes them.

When to give a key

A visitor's translation choice is remembered per link. The plugin names a link by the page's path, its passage, and which copy of that passage it is on the page. If your page shows only some of its links at a time, or reorders them, give each a stable data-st-key so the choice stays with the right one.