Javascript: td value == td value
        Posted  
        
            by Isis
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Isis
        
        
        
        Published on 2010-03-23T10:29:31Z
        Indexed on 
            2010/03/23
            10:33 UTC
        
        
        Read the original article
        Hit count: 522
        
JavaScript
|value
Hello
<tr>
<td class = "nowrap cr" id="cr1">123123</td>
<td class = "nowrap ch" id="ch1">123123</td>
</tr>
<tr>
<td class = "nowrap cr" id="cr2">123123</td>
<td class = "nowrap ch" id="ch2">123123</td>
</tr>
<tr>
<td class = "nowrap cr" id="cr3">123123</td>
<td class = "nowrap ch" id="ch3">123123</td>
</tr>
How do I set the font-weight: bold in tr where chID == crID
<script type="text/javascript">
$(function() {
    for(var i =0;i < 20;i++)
    {
        if($('#cr'+i).val() == $('#ch'+i).val())
        {
            $('#cr'+i).parent().css('font-weight', 'bold');
        }
    }
});
</script>
Dont' working. Any ideas? Sorry for bad english
© Stack Overflow or respective owner