I was reading this stackoverflow post:
Is $(document).ready() also CSS ready?
The answer is clear: no, $(document).ready()
does not guarantee complete CSS
rendering.
That left me wondering: What can I do to ensure full CSS
rendering before some jQuery
function (that relies on a fully rendered CSS
) is executed? Is there an event that gets fired once the CSS
is rendered? Is $(window).load()
the solution? $(window).load()
seems to work fine for me and also seems to be what this developer recommends:
http://taitems.tumblr.com/post/780814952/document-ready-before-css-ready (is our assumption)
Correct?