This is to ensure all DOM elements have been loaded before running the script.
$( document ).ready(function() { console.log( "This fires when the document isloaded" ); });