0 votes
by (160 points)
I'm trying to get a tooltip when I hover the mouse over a button or link, but would prefer to keep it in Twine code or HTML without going involving CSS or Javascript. Is there a way to do this? There's an existing system for images with [img[Tooltip|image]]. Does a similar one exist for other code?

1 Answer

+2 votes
by (43.1k points)
selected by
Best answer

You can just put a "span" around the link and set the "title" attribute to whatever you want the hover text to be, like this:

<span title="Hover text">[[test]]</span>

That should do the trick for most things.

by (160 points)
That works perfectly. Thanks so much.
by (157k points)

You can also use HTML Attributes to do the same with a HTML anchor element, however this will cause the related Passage Connection Arrow to disappear on the Passage Map if you are using one of the Twine (1.x or 2.x) applications.

<a data-passage="test" title="Hover text">Test</a>


Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.