JQuery click(function() location
<p>Does a click event always need to be placed inside (document).ready(function() as example below because I have seen click(function() located outside of it and I am wondering how to do it can be done</p>

<pre><code>$(document).ready(function(){

    $('#checkout').click(function() {

        alert("Thanks for visiting!");
    });

});
</code></pre>
