Understanding whe JavaScript is executed is crucial in creating the web 2.0 look and feel. JQuery greatly simplifies this. I think that people that started out there JavaScript with JQuery won’t appreciate how nice the library handles this.

Traditionally JavaScript programmer would hook most of their code in an onload event in the <body> tag of the HTML document. This would insure a way to hold off executing of the script until the DOM was finished loading. Unfortuntely this also waited for all the exeternal media on the page too load also. This resulted in not so smooth page loading, as you have to download all the images before the script and start executing.

JQuery solves this by executing the JavaScript after the DOM is finished but before the media has finished downloading, resulting in a smooth gradual evolvation of the page.



No Responses Yet to “JQuery – where is my onload in my body?”  

  1. No Comments Yet

Leave a Reply