jQuery ready/load document and window

by anandhinava

HTML

<iframe src="http://jquery.com"></iframe>

CSS

iframe {
    width: 100%;
    height: 400px;
}

JavaScript

// This is same as $(document).ready(function() {});
$(function () {
    console.log(Date.now(), "document loaded");
});

$(window).load(function () {
    console.log(Date.now(), "window loaded");
});