I understand the premise of $(document).ready
- in layman's terms, wait until the document object module is completely ready before executing this script - but what I don't understand is why all jQuery code can't just be run when the document is ready.
Do some functions need to be set up before the document finishes processing? Is it just an anomalous issue from the original structure when jQuery was written.
If anyone has a good answer to this, it would help my understanding as well as the understanding of many other jQuery users in the future.