Skip to content
document.addEventListener("DOMContentLoaded", function () {
const elements = document.querySelectorAll(".product-title a");
const maxWords = 5;
elements.forEach(function (el) {
const words = el.textContent.trim().split(/\s+/);
if (words.length > maxWords) {
el.textContent = words.slice(0, maxWords).join(" ") + "...";
}
});
});
You can`t add more product in compare
.