$(document).ready(function () execute every time code example Example: document ready $( document ).ready(function() { console.log( "ready!" ); });