jQuery document ready function
Details
The ready() method is used to make a function available after the document is loaded. Whatever code you write inside the $(document ).ready() method will run once the page DOM is ready to execute JavaScript code.
and Syntax is
before use jQuery script we need to add a javascript file or URL "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"
$(document).ready(function(){ /* Your Code */ });