When should I use jQuery’s document.ready function?
In simple words, $(document).ready is an event which fires up when document is ready. Suppose you have placed your jQuery code in head section and trying to access a dom element (an anchor, an img etc), you will not be able to access it because html is interpreted from top to bottom and your html … Read more