Is it possible to determine the exact moment the element exists in the DOM when the page loads?
Context: when I load a page, I hide an element of my page using jQuery (i.e. if JavaScript is available, I want to hide the div), but if the Internet connection is poor, you see the panel for a second or so before it disappears.
I would like to hide the element as soon as it is written to the DOM, but I do not know how to do this or even if it is possible. I do not want to use set display: hidden because I want the panel to display if JavaScript is not available.
TIA
Matt
Editorial: I use jQuery - and my code is executed from $ (document) .ready ().
source share