Document Ready Function in jQuery — a practical guide to jQuery document ready with clear examples you can reuse in real projects.
jQuery Tutorial Series (10/101). Prefer one article? Read the complete jQuery tutorial.
Short description
Prefer DOM ready over window load unless you need images fully loaded.
Ready
$(document).ready(function () {
// DOM ready
});
// Shorthand:
$(function () {
// DOM ready
});