To avoid re-rendering of the table row when clicked

i don't think you need this loop.

```js
var isRowAlreadySelected = element.hasClass('selected')

if (!isRowAlreadySelected) {
  element
    .parent()
    .find('.selected')
    .removeClass('.selected')
}

element.toggleClass('selected')
```