table-sort-js
Advanced tools
Comparing version 1.1.5 to 1.1.6
{ | ||
"name": "table-sort-js", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "A JavaScript client-side HTML table sorting library with no dependencies required.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -12,3 +12,3 @@ /* | ||
Frontend: <script src="https://leewannacott.github.io/table-sort-js/table-sort.js"></script> or | ||
Download this file and Add <script src="table-sort.js"></script> to your HTML | ||
Download this file and add <script src="table-sort.js"></script> to your HTML | ||
@@ -26,3 +26,3 @@ Backend: npm install table-sort-js and use require("../node_modules/table-sort-js/table-sort.js") | ||
for (let sortableTable of document.getElementsByTagName("table")) { | ||
if (sortableTable.className === "table-sort") { | ||
if (sortableTable.classList.contains("table-sort")) { | ||
if (sortableTable.getElementsByTagName("thead").length === 0) { | ||
@@ -95,6 +95,6 @@ const the = document.createElement("thead"); | ||
// Sort naturally; default aescending unless th is using 'order-by-desc' as className. | ||
// Sort naturally; default aescending unless th contains 'order-by-desc' as className. | ||
if (typeof columnData[0] !== "undefined") { | ||
if ( | ||
th.className === "order-by-desc" && | ||
th.classList.contains("order-by-desc") && | ||
timesClickedColumn === 1 | ||
@@ -107,3 +107,3 @@ ) { | ||
} else if ( | ||
th.className === "order-by-desc" && | ||
th.classList.contains("order-by-desc") && | ||
timesClickedColumn === 2 | ||
@@ -110,0 +110,0 @@ ) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10983