diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-29 00:11:57 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-29 00:48:50 +0200 |
commit | 255f26030a2712f06722205ad593e4f7df0ed76c (patch) | |
tree | 86caa8e5af231e3a18ce19e1fdc9cb3f80b678ca /static/script.js | |
parent | Add TODO to HTML. (diff) | |
download | calp-255f26030a2712f06722205ad593e4f7df0ed76c.tar.gz calp-255f26030a2712f06722205ad593e4f7df0ed76c.tar.xz |
Test tooltip library.
Diffstat (limited to '')
-rw-r--r-- | static/script.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/static/script.js b/static/script.js index b94e8f06..91c840e3 100644 --- a/static/script.js +++ b/static/script.js @@ -245,14 +245,33 @@ window.onload = function () { } } + /* for (let popup of document.getElementsByClassName("popup")) { ev = parents_until(popup, {class: "event"}) e = ev.getElementsByClassName("body")[0] e.onclick = new_popup; /* disable scroll to element in side list if popups are available. - */ + * / e.parentElement.removeAttribute("href"); } + */ + } + +$(document).ready(function() { + Tipped.setDefaultSkin('none'); + Tipped.create(".event", { + /* no padding, I am the one who styles! */ + padding: false, + /* Don't remove from DOM when hiding */ + detach: false, + + /* click element to toggle. + Elements with class "close-tooltip" also + acts as close buttons */ + showOn: 'click', + hideOn: 'click', + }); +}); |