I want to check the checkbox based on the text in the next column. Here's how I did it, is there a more concise way?

[JSFiddle](https://jsfiddle.net/3fyscpxr/) 

```
<table id="table1">
<tr><td><input type="checkbox"></td><td>Text 1</td></tr>
<tr><td><input type="checkbox"></td><td>Text 2</td></tr>
<tr><td><input type="checkbox"></td><td>Text 3</td></tr>
</table>

$(function(){
    $('input[type=checkbox]').each(function(){
    //this.checked = true;
    var strVal = $(this).closest('td').next('td').text();
    if (strVal=='Text 2')
        this.checked = true;
    //alert(strVal);
  });
});

```