title: Remove preventDefault() On A Click Event After 2 Seconds
body: <p>I have a preventDefault() method on some links that I would like to remove after 2 seconds.</p>
  <p>I'm trying to both work out how to remove the preventDefault() - which stops the links from working, but also how to do it so it happens after 2 seconds.</p>
  <p>I thought I could do it by removing the 'link' class the initial forEach loop happens on, but alas this doesn't work.</p>
  <p>Does anyone know how to solve this problem?</p>
  <p>CodePen: <a href="https://codepen.io/emilychews/pen/VwPJNGE" rel="nofollow noreferrer">https://codepen.io/emilychews/pen/VwPJNGE</a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var link = document.querySelectorAll(".link");
  
  // prevent default on all specific links
  link.forEach(function (item) {
    item.addEventListener("click", function (e) {
      e.preventDefault();
    });
  });
  
  // remove prevent Default
  function allowLinks() {
    link.forEach(function (item) {
      item.classList.remove("link");
    });
  }
  
  setTimeout(function() {
    allowLinks();
  }, 2000);</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;a target="_blank" href="https://google.com" class="link"&gt;Make me work after 2 seconds&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>