Facebook
From Baby Stork, 5 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 242
  1. const elements = document.getElementsByClassName("grid-item");
  2. const text = " działaj kurwo proszę"
  3.  
  4. for (const element of elements) {
  5.     const child = element.children[0]
  6.     element.addEventListener("click", function () {
  7.         for (const letter of text) {
  8.             setTimeout(function () {
  9.                 child.innerHTML += letter
  10.             }, Math.floor(Math.random() * 1000) + 500)
  11.         }
  12.     })
  13. }