The Document Ready Event
Wrap code in a ready handler so it runs after the DOM has loaded. The short form is $(function(){}).
Example
$(document).ready(function () {
alert('DOM ready');
});
$(function () {
// same thing
});Exercise
Ready event.
$(document).(fn)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.