how to use each in document ready of jquery code example Example: document ready $( document ).ready(function() { console.log( "ready!" ); });