le_francais/popupfootnotes.js

23 lines
653 B
JavaScript
Raw Normal View History

2023-01-21 21:23:12 +00:00
$(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,
padding: "5px",
"padding-bottom": "2px",
"z-index": 1000
}).appendTo("body");
}).mouseout(() => {
$(popup).remove();
});
});
});