convert javascript to jQuery to disable text boxes on option selection
<p>I am currently using javascript to disable a text box if my "remote_server" option is set to no.  Here is my existing code</p>

<p><strong>HTML</strong></p>

<pre><code>&lt;select name="remote_server" class="required"&gt;
    &lt;option&gt;&lt;/option&gt;
    &lt;option value="1" &lt;?php if($remote=="1") echo 'selected="selected"'; ?&gt;&gt;Yes&lt;/option&gt;
    &lt;option value="0" &lt;?php if($remote=="0") echo 'selected="selected"'; ?&gt;&gt;No&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p><strong>Javascript</strong></p>

<pre><code>var e = document.getElementsByName("remote_server")[0]
var strUser = e.options[e.selectedIndex].value;

if ( strUser == 0 ) {
document.getElementsByName("ftp_hostname")[0].setAttribute("disabled", "disabled");
document.getElementsByName("ftp_user")[0].setAttribute("disabled", "disabled");
document.getElementsByName("ftp_password")[0].setAttribute("disabled", "disabled");
document.getElementsByName("ftp_mode")[0].setAttribute("disabled", "disabled");
document.getElementsByName("ftp_port")[0].setAttribute("disabled", "disabled");
document.getElementsByName("ftp_directory")[0].setAttribute("disabled", "disabled");
}
</code></pre>

<p>Is there an easy way to convert this to jquery so that at the moment the option is chosen the text boxes will be either enabled or disabled?</p>
