Tsallaka zuwa abun ciki
Justice Tech School

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

Why use ready?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.