Every time I'm going to use JSFiddle I see options for initializing jQuery content via onLoad
or onDomready
.
I tested with most scripts I wrote and there was no functional difference whatsoever. Searching on Google has seen that one of the main differences is that via onLoad
scripts only begin to run after all elements are loaded and this includes CSS, JS files, images, and so on, which can be useful if you need to load files javascript in a certain order, but at some point one of these files makes reference to another one that has not yet been loaded, while viewing onDomready
once loaded the HTML content of the page the scripts begin to be loaded already without necessarily the others have been.
- Did I understand this difference?
- Is there any further difference to be studied and perceived?