Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Run code only after the DOM is fully loaded.
Document Ready is easiest to learn by reading the example, changing it, and observing the result.
// Run code only after the DOM is fully built
$(document).ready(function () {
console.log('DOM is ready');
});
// Shorthand for the same thing
$(function () {
$('h1').text('Page loaded');
});Practice the Document Ready example in a small scratch file, then explain what changed and why.