rayfidelity wrote:
Klaus thanks it works!
Since you made a great suggestion, here's the thing
it's like this
<ul>
<li><input type="radio" name="section" value="">bla bla</li>
<li><input type="radio" name="section" value="">bla bla 2</li>
</ul>
i'd actually like to change the background of the list item, so how do
i append the class to the appropriate list item?
Try this:
$(document).ready(function() {
$("[EMAIL PROTECTED]'section']").click(function(){
$(this).parent()[this.checked ? 'addClass' :
'removeClass']('checked');
});
});
li.checked {
background: red;
}
--Klaus