The jQuery document ready ($(document).ready()) method was implemented to execute code when the DOM is fully loaded. Since it executes the given function when all DOM elements are available, you can be sure that trying to access or manipulate elements will work. Before jQuery 3.0, the typical usage with a anonymous function looked like this: $(document).ready(function() { // Handler for .ready() c