How can i apply CSS with Jquery at parent div on user selection?
<p>How can i use Jquery to add a class on user selection?</p>

<p>My Aspx markup is as follows.</p>

<pre><code>     &lt;div id="Answer" class="Ans"&gt;
           &lt;div id ="Left"&gt; 
           &lt;asp:RadioButton ID="rdAnsBool1" runat="server" Text = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans1") %&gt;' /&gt;
           &lt;asp:RadioButton ID="rdAnsBool2" runat="server" Text = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans2") %&gt;' /&gt;
           &lt;asp:RadioButton ID="rdAnsBool3" runat="server" Text = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans3") %&gt;' /&gt;
           &lt;asp:RadioButton ID="rdAnsBool4" runat="server" Text = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans4") %&gt;' /&gt;
           &lt;asp:RadioButton ID="rdAnsBool5" runat="server" Text = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans5") %&gt;' /&gt;
           &lt;asp:RadioButton ID="rdAnsBool6" runat="server" Text = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans6") %&gt;' /&gt;
           &lt;asp:HiddenField ID="HiddenField1" runat="server" Value = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans1Bool") %&gt;'/&gt;
           &lt;asp:HiddenField ID="HiddenField2" runat="server" Value = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans2Bool") %&gt;'/&gt;
           &lt;asp:HiddenField ID="HiddenField3" runat="server" Value = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans3Bool") %&gt;'/&gt;
           &lt;asp:HiddenField ID="HiddenField4" runat="server" Value = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans4Bool") %&gt;'/&gt;
           &lt;asp:HiddenField ID="HiddenField5" runat="server" Value = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans5Bool") %&gt;'/&gt;
           &lt;asp:HiddenField ID="HiddenField6" runat="server" Value = '&lt;%# DataBinder.Eval(Container.DataItem, "Ans6Bool") %&gt;'/&gt;
           &lt;/div&gt;
        &lt;/div&gt;
</code></pre>

<p>The visitor may select the answer by choosing the "winning question" radiobutton</p>

<p>The HiddenFields contain true or false</p>

<p>So if the user selects the rdAnsBool1 and the value of the HiddenField1 is "True", the JQuery should add a "correct" CSS class to the parent div with ID = Answer</p>

<p>If the user selects the rdAnsBool1 and the value of the HiddenField1 is "False", the JQuery should add a "wrong" CSS class to the parent div with ID = Answer</p>

<p>In your answers please keep in mind that the following markup is rendered within a list view</p>

<p>And here is the JSFiddle link</p>

<p><a href="http://jsfiddle.net/VTevz/" rel="nofollow">http://jsfiddle.net/VTevz/</a></p>
