From 255f26030a2712f06722205ad593e4f7df0ed76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 29 Apr 2020 00:11:57 +0200 Subject: Test tooltip library. --- static/script.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'static/script.js') 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', + }); +}); -- cgit v1.2.3