jQuery: $(document).ready and $(window).load


$(document).ready(function(){
//code
});

Specify a function to execute when the DOM is fully loaded.


$(window).load(function(){
//code
});

Specify a function when the page is fully loaded including graphics.

Advertisements

JavaScript Lectures by Douglas Crockford

The JavaScript Programming Language

Yahoo! JavaScript Architect Douglas Crockford provides a comprehensive introduction to the JavaScript Programming Language in this four-part video.

Slides from this lecture are available here:  http://yuiblog.com/assets/crockford/javascript.zip

Advanced JavaScript

Douglas Crockford teaches “Advanced JavaScript.” This course is broken into three clips; this is the first of those three clips.

Slides from this lecture are available here: http://yuiblog.com/assets/crockford/advancedjavascript.zip

JavaScript – The Good Parts

Douglas Crockford delivered the keynote talk at the 2007 Konfabulator Developer Day and discussed the evolution of JavaScript and of his relationship to the language. Through his description of his own journey with the language, Douglas evokes what he considers to be the “good stuff” therein.

Theory of the DOM

Douglas Crockford teaches “An Inconvenient API: The Theory of the Dom.” This course is broken into three clips.

Slides from this lecture are available here: http://yuiblog.com/assets/crockford/theory.zip

Useful links