Blog generator, publish manager, share scripts, theme CSS, highlight.js bundles, font, favicon, templates and generated-reference outputs, plus an English installation guide.
27 lines
856 B
JavaScript
27 lines
856 B
JavaScript
<script>
|
|
(function () {
|
|
function clearColHover(table) {
|
|
table.querySelectorAll(".col-hover").forEach(function (el) {
|
|
el.classList.remove("col-hover");
|
|
});
|
|
}
|
|
document.addEventListener("mouseover", function (e) {
|
|
var cell = e.target.closest("td, th");
|
|
if (!cell) return;
|
|
var table = cell.closest("table");
|
|
if (!table) return;
|
|
clearColHover(table);
|
|
var idx = cell.cellIndex;
|
|
table.querySelectorAll("tr").forEach(function (tr) {
|
|
var c = tr.children[idx];
|
|
if (c) c.classList.add("col-hover");
|
|
});
|
|
});
|
|
document.addEventListener("mouseout", function (e) {
|
|
var table = e.target.closest("table");
|
|
if (table && !table.contains(e.relatedTarget)) {
|
|
clearColHover(table);
|
|
}
|
|
});
|
|
})();
|
|
</script> |