| testing | Fix test example | |
| build.ts | Draft everything | |
| deno.json | Draft everything | |
| deno.lock | Draft everything | |
| deps.ts | Draft everything | |
| LICENSE | Draft everything | |
| mod.ts | Draft everything | |
| README.md | Prepare for release | |
| typeCheck.ts | Draft everything | |
| webtt.js | Fix test example | |
WebTT Implementation
An implementation of client-side javascript for WebTT (Web Tooltips), a specification for nestable, cross-domain tooltips without any server-side logic.
Instructions
This repository provides a minified javascript file you can simply include in
your tooltip pages and host pages: webtt.js.
To compile the typescript source, run deno task build (requires
the deno javascript runtime, but you can probably figure
out your own preferred way of comiling typescript as well).
Styling
This implementation places tooltip iframes as the sole children of divs of class
tooltipContainer. Such divs should be styled to be positioned absolutely
(.tooltipContainer { position: absolute; }), because we position them by
adding dynamically computed left and top styles
to these divs. The iframe itself is given a style="height: 123px; style (where
123px is replaced with an appropriate height automatically).
200 milliseconds before a tooltip is fully removed, we apply the
tooltipFadeout class to its tooltipContainer.
When spawning a tooltip for an anchor with a data attribute
data-tooltip-class="some classes", these classes are added to the
tooltipContainer div.