onready function javascript code example Example: js document ready $( document ).ready(function() { console.log( "ready!" ); });