re: Can you explain to me what's going on in this code? VIEW POST


On load, the entire page is hidden. Meanwhile, it's checking after 4 seconds for GTM's dataLayer global variable to be set. When it's available, it'll remove the .async-hide class to show the page.

And it looks like the i, d, and e are dummy arguments just there to do something cute like making it spell out asynchide 🤔

I'm a bit less sure why it's only waiting 4 seconds before the check though.

code of conduct - report abuse