le_francais/popupfootnotes.js
2023-01-21 23:43:06 +01:00

24 lines
688 B
JavaScript

$(document).ready(() => {
$("a[id^='footnote_source_']").each((idx, elm) => {
var id = elm.id.slice(16);
var footnote = $("#" + id).clone();
footnote.children("a").remove();
// footnote.remove(".a");
var popup;
$(elm).mouseover(() => {
popup = footnote.css({
position: "absolute",
scale: "125%",
top: $(elm).offset().top,
left: $(elm).offset().left + $(elm).width() - 30,
"border-style": "solid",
padding: "5px",
"padding-bottom": "2px",
"z-index": 1000
}).appendTo("body");
}).mouseout(() => {
$(popup).remove();
});
});
});