skip to Main Content

Execute Javascript after 2 seconds – Jquery

I am trying to use setInterval or setTimeout but the primary element getting removed. Code without Javascript delay : Working fine const selectAllWithAttributeAdStatus = document.querySelectorAll("[data-ad-status]"); selectAllWithAttributeAdStatus.forEach(ad => { if ((ad.getAttribute("data-ad-status")) === "unfilled") { document.write("<h1>Unfilled</h1>"); } else { document.write("<h1>Filled</h1>"); }; })…

VIEW QUESTION
Back To Top
Search