Enable one column on change of another column in jquery
<p>My rows in table is below.  </p>

<pre><code>  &lt;table&gt;
    &lt;tr&gt;
    &lt;td&gt;Site1&lt;/td&gt;
    &lt;td&gt;
    &lt;select class="countryList"  
            name="countryList" 
            onchange="toggleVisibility(this);"&gt;
           &lt;option value=""&gt;&lt;/option&gt;
            &lt;option value="country1" selected&gt;country1&lt;/option&gt;
            &lt;option value="country2" &gt;country2&lt;/option&gt;
   &lt;/select&gt;
  &lt;/td&gt;
   &lt;td&gt;
    &lt;select class="stateList"  
            name="stateList" 
            &gt;
           &lt;option value=""&gt;&lt;/option&gt;
            &lt;option value="state1" disabled&gt;state1&lt;/option&gt;
            &lt;option value="state2" disabled&gt;state2&lt;/option&gt;
            &lt;option value="state3" disabled&gt;state3&lt;/option&gt;

            &lt;/select&gt;

   &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;Site2&lt;/td&gt;
&lt;td&gt;
    &lt;select class="countryList"  
            name="countryList" 
            onchange="toggleVisibility(this);"&gt;
           &lt;option value=""&gt;&lt;/option&gt;
            &lt;option value="country1" &gt;country1&lt;/option&gt;
            &lt;option value="country2" selected&gt;country2&lt;/option&gt;
   &lt;/select&gt;
  &lt;/td&gt;
   &lt;td&gt;
    &lt;select class="stateList"  
            name="stateList" 
            &gt;
           &lt;option value=""&gt;&lt;/option&gt;
            &lt;option value="state1" selected&gt;state1&lt;/option&gt;
            &lt;option value="state2" &gt;state2&lt;/option&gt;
            &lt;option value="state3" &gt;state3&lt;/option&gt;

            &lt;/select&gt;

   &lt;/td&gt;
    &lt;/tr&gt;

    &lt;/table&gt;
</code></pre>

<p>Here  <code>toggleVisibility</code> method should enable the visibility of <code>stateList</code>. I have written below. </p>

<pre><code>function toggleVisibility(element){
                var country = $(element).attr("value");
                if(country == 'US'){
                    $(element).next().attr("disabled", false);
                    }else $(element).next().attr("disabled", true);
            }
</code></pre>

<p>But i am getting javascript error that <code>$(element).next().attr</code> not defined. Please point me my error.Suggest me good documentaiton on JQuery table manipulation. Thank you very much for your time.</p>
