Author Profile
- Home
- Author Profile
LandHomeSolutions1
Member since 1 month ago
function initReadMore() {
document.querySelectorAll(".elementor-testimonial__text").forEach(function(text) {
if (text.parentNode.querySelector(".read-more-btn")) {
return;
}
var btn = document.createElement("span");
btn.className = "read-more-btn";
btn.innerHTML = "Read more";
text.parentNode.insertBefore(btn, text.nextSibling);
btn.onclick = function(e) {
e.stopPropagation();
text.classList.toggle("expanded");
if (text.classList.contains("expanded")) {
btn.innerHTML = "Read less";
} else {
btn.innerHTML = "Read more";
}
};
});
}
document.addEventListener("DOMContentLoaded", function() {
initReadMore();
});
setTimeout(function() {
initReadMore();
}, 1000);
setTimeout(function() {
initReadMore();
}, 2000);