Trigger this script as page loads
<p>I have a jQuery script, which is triggered when a checkbox is selected (or deselected). It causes the whole page to be disabled, or enabled.</p>

<p>It is working as intended, but I have to start the page in "edit" mode.</p>

<p><strong>I need to be able to set if the page starts in edit mode, or disabled mode when the page initially loads.</strong> </p>

<p>I can easily pass a variable via PHP - but I'm not sure where/how to do it, or what to trigger?</p>

<p>This is my triggering script</p>

<pre><code>&lt;script&gt;
    $('#switch-enable').change(function()
    {
        if ($('#switch-enable').is(':checked')) {
            $('#disabled-switches *').prop("disabled", false);  
        } else {
            $('#disabled-switches *').prop("disabled", true);   
        }
    } );
&lt;/script&gt;
</code></pre>
