Jquery/Javascript radio button on change
<p>I am using the following code to make a certain section of my form show or hide depending on the selection of the radio buttons.  However, if I leave the page and come back to it (I leave the page to fill out other sections of the form that are then placed back on the main form) the state of the radio button selection isn't remembered even if the user already made a selection and filled out the fields.  Have I done something wrong with my Jquery?</p>

<p>Code for Jquery radio button hide/show:</p>

<pre><code>$(document).ready(function() {
                $("[name=delvchoice]").change(function(){
                    $("#list").toggle($("[name=delvchoice]").index(this)===1);
                });
            });
</code></pre>

<p>HTML code of the page for the radio buttons:</p>

<pre><code>&lt;div&gt;
                    &lt;table&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Will the above items be delivered by your department to the Surplus Warehouse?&lt;/td&gt;
                            &lt;td&gt;&lt;input type="radio" name="delvchoice" property="delvchoice" value="Yes"/&gt;Yes&lt;/td&gt;
                            &lt;td&gt;&lt;input type="radio" name="delvchoice" property="delvchoice" value="No"/&gt;No&lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
                    &lt;/div&gt;
</code></pre>

<p>HTML code for the hide/show section:</p>

<pre><code>&lt;div id="list" style="display: none;"&gt;
                        &lt;div&gt;
                        &lt;table&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Should you choose to have Physical Plant Support Services deliver the items for your department you must provide an
                                    account number for the labor charge:&lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
                        &lt;table&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Account Number :&lt;/td&gt;
                            &lt;logic:notEmpty name="SurplusSaveForm" property="acctno1" scope="session"&gt;
                                &lt;td&gt;
                                    &lt;table border="0"&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;&lt;bean:write name="SurplusSaveForm" property="acctno1" scope="session"/&gt;-
                                                &lt;bean:write name="SurplusSaveForm" property="acctno2" scope="session"/&gt;-
                                                &lt;bean:write name="SurplusSaveForm" property="acctno3" scope="session"/&gt;-
                                                &lt;bean:write name="SurplusSaveForm" property="acctno4" scope="session"/&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                    &lt;/table&gt;
                                &lt;/td&gt;
                            &lt;/logic:notEmpty&gt;
                            &lt;logic:empty name="SurplusSaveForm" property="acctno1" scope="session"&gt;
                                &lt;td&gt;&lt;html:text size="2" property="acctno1" maxlength="2" onkeyup="nextbox(this,'acctno2');"/&gt;-
                                    &lt;html:text size="2" property="acctno2" maxlength="2" onkeyup="nextbox(this,'acctno3');"/&gt;-
                                    &lt;html:text size="5" property="acctno3" maxlength="5" onkeyup="nextbox(this,'acctno4');"/&gt;-
                                    &lt;html:text size="3" property="acctno4" maxlength="3" onkeyup="nextbox(this,'acctno4');"/&gt;
                                &lt;/td&gt;
                            &lt;/logic:empty&gt;
                            &lt;td&gt;&lt;b&gt;&lt;html:submit property="btn_findAccount"&gt;Search for and choose&lt;/html:submit&gt;&lt;br&gt;your Account&lt;/b&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
                    &lt;/div&gt;  
</code></pre>
