What is the best way to check if dynamic web pages are fully loaded?

advertisements

I only need to check that the page is loaded (without dynamic objects that might be modified after page appears fully)

I know JQuery's function: "ready()"

Will this function be relevant in the described-above case? Is there another / better way?


window.onload isn't a jQuery function, it's a DOM event.

If using jQuery the best way to check whether the page is loaded is to handle the ready event which can be done in various ways

Shortest

$(function() {
    // DOM initialized
});

Short

$.ready(function() {
    // DOM initialized
});

Longer

$(document).ready(function() {
    // DOM initialized
});

Longest

jQuery(document).ready(function() {
    // DOM initialized
});