NestEdge Script Body

 avatar
user_3758723130
javascript
a year ago
740 B
7
Indexable
<script>
function addWowClassToHeadings() {
    /*Get the elements to which the classes are to be added*/
    let titles = document.querySelectorAll("lp-h2, lp-h1, lp-h3, lp-h4, .lp-h6, h2, h1, h3, h4");
    titles.forEach((title, index) => {
    /*Classes to add*/
        if (index % 2 === 0) {
            title.classList.add("wow", "animated", "fadeInLeft");
        } else {
            title.classList.add("wow", "animated", "fadeInRight");
        }
    });
}
document.addEventListener("DOMContentLoaded", () => {
    /*Init the library to animate on scroll*/
    new WOW().init();
    /*Call the function*/
    addWowClassToHeadings();
});
</script>

<script src="//code.tidio.co/rfdm7s63qcux17vzeyywzvzxgw2jnhvh.js" async></script>
Editor is loading...
Leave a Comment