aboutsummaryrefslogtreecommitdiff
path: root/static/script.js
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-29 00:11:57 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-29 00:48:50 +0200
commit255f26030a2712f06722205ad593e4f7df0ed76c (patch)
tree86caa8e5af231e3a18ce19e1fdc9cb3f80b678ca /static/script.js
parentAdd TODO to HTML. (diff)
downloadcalp-255f26030a2712f06722205ad593e4f7df0ed76c.tar.gz
calp-255f26030a2712f06722205ad593e4f7df0ed76c.tar.xz
Test tooltip library.
Diffstat (limited to 'static/script.js')
-rw-r--r--static/script.js21
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',
+ });
+});