1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-27 00:38:47 +00:00
X10D/docfx_project/templates/singulinkfx/styles/singulink.js

38 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-05-12 13:24:13 +00:00
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.
function toggleMenu() {
var sidebar = document.getElementById("sidebar");
var blackout = document.getElementById("blackout");
if (sidebar.style.left === "0px")
{
sidebar.style.left = "-" + sidebar.offsetWidth + "px";
blackout.classList.remove("showThat");
blackout.classList.add("hideThat");
}
else
{
sidebar.style.left = "0px";
blackout.classList.remove("hideThat");
blackout.classList.add("showThat");
}
}
$(function() {
$('table').each(function(a, tbl) {
var currentTableRows = $(tbl).find('tbody tr').length;
$(tbl).find('th').each(function(i) {
var remove = 0;
var currentTable = $(this).parents('table');
var tds = currentTable.find('tr td:nth-child(' + (i + 1) + ')');
tds.each(function(j) { if ($(this).text().trim() === '') remove++; });
if (remove == currentTableRows) {
$(this).hide();
tds.hide();
}
});
});
});