This is not a problem from a technical point of view, because it document.ready()only works after a complete analysis of the DOM.
I would not consider this a good style. This can make maintenance difficult because you can no longer see what happens with the loading of the document.
document.ready(), , head script , .