jQuery - Opacity and Disabling issues
<p>I have the following HTML</p>

<pre><code>&lt;div class="line"&gt;
    &lt;label&gt;&lt;span&gt;1.&lt;/span&gt;This is a first question?&lt;/label&gt;
    &lt;div class="right-box small"&gt;
        &lt;input type="radio" name="" value=""&gt;&lt;label style="padding-left: 3px; padding-right: 24px;"&gt;No&lt;/label&gt;&lt;input type="radio" name="" value=""&gt;&lt;label style="padding-left: 3px;"&gt;Yes&lt;/label&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="line"&gt;
    &lt;label&gt;&lt;span&gt;2.&lt;/span&gt;This is a second question?&lt;/label&gt;
    &lt;div class="right-box small"&gt;
        &lt;input type="radio" name="" value=""&gt;&lt;label style="padding-left: 3px; padding-right: 24px;"&gt;No&lt;/label&gt;&lt;input type="radio" name="" value=""&gt;&lt;label style="padding-left: 3px;"&gt;Yes&lt;/label&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class="line"&gt;
    &lt;label&gt;&lt;span&gt;3.&lt;/span&gt;This is a third question?&lt;/label&gt;
    &lt;div class="right-box small"&gt;
        &lt;input type="radio" name="" value=""&gt;&lt;label style="padding-left: 3px; padding-right: 24px;"&gt;No&lt;/label&gt;&lt;input type="radio" name="" value=""&gt;&lt;label style="padding-left: 3px;"&gt;Yes&lt;/label&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>and i have the following jQuery code</p>

<pre><code>&lt;script type="text/javascript"&gt;
jQuery.noConflict();
jQuery(document).ready(function() {
    //grey out all lines.
    jQuery(".line").css({opacity:'0.2'});
    jQuery(".line input").attr("disabled", "disabled");

    //add input change handlers
    jQuery(".line input").change(function() {
        //enable the next line
        jQuery(this).parents(".line").next(".line").css({opacity:'1'});
        jQuery(this).parents(".line").next(".line").find("input").attr("disabled", "");
    });

    //enable the first line
    jQuery(".line:first").css({opacity:'1'});
    jQuery(".line:first input").attr("disabled", "");
});
&lt;/script&gt;
</code></pre>

<p>the script is meant to gray out and disable each section based on if a user clicks a radio button in the previous section.</p>

<p>At the moment the script grays out all sections except for the first, but the other fields in the grayed out areas are not being disabled, and also when a radio button is pressed, the opacity isnt changing on the next div 'line' ... Can anyone see where im going wrong, its doing my head in.</p>

<p>Cheers,</p>
