The jQuery attr() does not update its value on changing
<p>The jQuery attr() does not update its value on changing. Here is my code below:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;script type="text/javascript" src="jquery-1.6.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function(){
    var Religion = $("#Religion"),
        SelectCaste = $("#SelectCaste"), 
        Hindu = $("#Hindu"), 
        Muslim = $("#Muslim"), 
        Christian = $("#Christian");

        Religion.change(function(){ 
        var sReligion = $(this).val();  
        SelectCaste.hide().attr('name', '');
        Hindu.hide().attr('name', '');
        Muslim.hide().attr('name', '');
        Christian.hide().attr('name', '');
        if(sReligion=="1") {
                Hindu.show();
                Hindu.attr('name','Caste');
            }
            else if(sReligion=="2") {
                Muslim.show();
                Muslim.attr('name','Caste');
            }
            else if(sReligion=="3") {
                Christian.show();
                Christian.attr('name','Caste');
            }
    });
});
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%"&gt;
&lt;tr&gt;
    &lt;td&gt;Religion&lt;/td&gt;
    &lt;td&gt;
        &lt;select class="FormInput" name="Religion" id="Religion"&gt;
            &lt;option selected="selected" label="Select" value=""&gt;- Select Religion -&lt;/option&gt;
            &lt;option label="Hindu" value="1"&gt;Hindu&lt;/option&gt;
            &lt;option label="Muslim" value="2"&gt;Muslim&lt;/option&gt;
            &lt;option label="Christian" value="3"&gt;Christian&lt;/option&gt;
        &lt;/select&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;Caste&lt;/td&gt;
    &lt;td&gt;
        &lt;select class="FormInput" id="SelectCaste" disabled="disabled"&gt;
            &lt;option value="" selected="selected"&gt;- Select Caste -&lt;/option&gt;
        &lt;/select&gt;
        &lt;div id="CasteList"&gt; 
        &lt;select class="FormInput" id="Hindu" style="display:none"&gt;
            &lt;option value="" selected="selected"&gt;- Select Caste -&lt;/option&gt;
            &lt;option value="1"&gt;Ad Dharmi&lt;/option&gt;
            &lt;option value="2"&gt;Adi Dravida&lt;/option&gt;
            &lt;option value="3"&gt;Aggarwal&lt;/option&gt;
            &lt;option value="4"&gt;Agri&lt;/option&gt;
            &lt;option value="5"&gt;Ahom&lt;/option&gt;
            &lt;option value="6"&gt;Ambalavasi&lt;/option&gt;
            &lt;option value="7"&gt;Arora&lt;/option&gt;
            &lt;option value="8"&gt;Arunthathiyar&lt;/option&gt;
            &lt;option value="9"&gt;Arya Vysya&lt;/option&gt;
            &lt;option value="10"&gt;Others&lt;/option&gt;
        &lt;/select&gt;
        &lt;select class="FormInput" id="Muslim" style="display:none"&gt;
            &lt;option value="" selected="selected"&gt;- Select -&lt;/option&gt;
            &lt;option value="328"&gt;Ehle Hadith&lt;/option&gt;
            &lt;option value="329"&gt;Gulf Muslims&lt;/option&gt;
            &lt;option value="330"&gt;Memon&lt;/option&gt;
            &lt;option value="331"&gt;Ansari&lt;/option&gt;
            &lt;option value="332"&gt;Arain&lt;/option&gt;
            &lt;option value="333"&gt;Awan&lt;/option&gt;
            &lt;option value="334"&gt;Bengali&lt;/option&gt;
            &lt;option value="357"&gt;Others&lt;/option&gt;
        &lt;/select&gt;
        &lt;select class="FormInput" id="Christian" style="display:none"&gt;
            &lt;option value="" selected="selected"&gt;- Select -&lt;/option&gt;
            &lt;option value="358"&gt;Born Again&lt;/option&gt;
            &lt;option value="359"&gt;Bretheren&lt;/option&gt;
            &lt;option value="360"&gt;CMS&lt;/option&gt;
            &lt;option value="361"&gt;CNI&lt;/option&gt;
            &lt;option value="362"&gt;CSI&lt;/option&gt;
            &lt;option value="363"&gt;Catholic&lt;/option&gt;
            &lt;option value="364"&gt;Roman Catholic&lt;/option&gt;
            &lt;option value="365"&gt;Evangelical&lt;/option&gt;
            &lt;option value="376"&gt;Others&lt;/option&gt;
        &lt;/select&gt;
        &lt;/div&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>On changing the 'Religion' selectbox, the other dropdown boxes (Hindu / Muslim / Christian) does not hold the attribute name="Caste".</p>

<p>Please assist me to fix the issue..</p>

<p>Thanks.</p>
