wait for dom to load jquery code example Example: jquery doc on ready $(document).ready(() => { console.log('ready'); });