Checking the state of a select control after the value has changed with a cookie?
<p>I implemented some code (below) to check the state of ContentID and hide or show a DIV:</p>

<pre><code>        &lt;select id="ContentID" name="ContentID"&gt;
          &lt;option selected="selected" value="00"&gt;Menu&lt;/option&gt;
          &lt;option value="01"&gt;Topic&lt;/option&gt;
        &lt;/select&gt;
        &lt;input id="htmlEdit" type="checkbox" /&gt;

        $("#ContentID")
            .val($.cookie("ContentID_dropdown"))
            .change(function () {
                if ($(this).val() == "00")
                    $("#htmlSwitch").show();
                else
                    $("#htmlSwitch").hide();
                $.cookie("ContentID_dropdown", $(this).val(), { expires: 365, path: '/' });
                refreshGrid("Content");
            });
</code></pre>

<p>This code works BUT only when the value of ContentID changes. What I need is something that will also check the value after the value has been changed with a cookie.</p>

<p>The code in the change function that checks .val() does not check anything or run when the initial value is set with a cookie. So if my cookie is for example set to Topic then it is ignored and the htmlSwitch DIV appears when it should not. Is there a way that I could make it check the initial value and also hide or show the htmlSwitch id?</p>
