I'm trying to give style to the cells in specific table rows via jQuery.

The catch is that I need to check an attribute row by row and if I found something I expect, the row **BEFORE** the current one should be re-styled.

I'm using the following code but instead of draw the border only for the cells of the row, it draws it for every cell in the table:

```
$(".some_class_for_every_row_in_the_table").each(function() {
    var control_variable = ... //This is the attribute
    if (control_variable) {
        $(previous_row).find('td').each(function() {$(this).css('border-bottom', "1px solid #AAAAAA")});
    }
    previous_row = this; 
...
})

```

This is the HTML of the table:

```
<table>
    ...
    <tbody>
        <tr control_variable="...">
          <td>...</td>
        </tr>
        <tr control_variable="...">
          <td>...</td>
        </tr>
        ...
   </tbody>
</table>

```

The `control_variable` is gotten with the correct value and previous\_row maintains consistency at all times.

I'm sorry if I mis leaded with the first version of the question.

What is the problem with my code?