At a Glance Script tags have access to any element which appears before them in the HTML. jQuery.ready / DOMContentLoaded occurs when all of the HTML is ready to interact with, but often before its been rendered to the screen. The load event occurs w
https://www.w3schools.com/jquery/event_ready.asp Example Use ready() to make a function available after the document is loaded: $(document).ready(function(){ $("button").click(function(){ $("p").slideToggle(); }); }); Definition a