I will make my 2 cents here.
With jquery, the $ ("document") event. ready () is launched after the DOM is fully loaded (without images, that is) into your browser, but is not displayed. Therefore, I think that in order to achieve what you want, you will need to introduce some handler function inside the ".ready ()" method to handle everything that you want to achieve.
Is this what you were looking for?
source
share