co1903 co1903 - 1 year ago 48
Javascript Question

I am trying to figure out below javascript and what it does

I am trying to figure out below script and what it does.

Any help is appropriated

$(document).ready(function(){
console.log('Hello World!');
});

Answer Source

You can read an explanation here.

From that site:

A page can't be manipulated safely until the document is "ready". jQuery detects this state of readiness for you. Code included inside $( document ).ready() will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download