Today you can make a sinlge selection but If I want to select everything by checkboxing the input box (left of the text "Name").

I don't know how to do it?

Info.  

Another thing to take account to. If you have selected a single row and them you want to select everyting included the selected one or many.
And also one thing. The header should not be selected by changing the background color.

Thanks!

```js
$("table input[type=checkbox]").on("change", function() {
    if (this.checked) {
        $(this).parents('tr').addClass('selected');
    } else {
        $(this).parents('tr').removeClass('selected');
    }  
});
```

```css
tr.selected { background-color: yellow; }
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<table>
    <thead>
        <tr>
            <th><input type="checkbox" /></th>
            <th>Name</th>
            <th>Location</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><input type="checkbox" /></td>
            <td>Name 1</td>
            <td>Location 1</td>
        </tr>
        <tr>
            <td><input type="checkbox" /></td>
            <td>Name 2</td>
            <td>Location 2</td>
        </tr>
        <tr>
            <td><input type="checkbox" /></td>
            <td>Name 3</td>
            <td>Location 3</td>
        </tr>
    </tbody>
</table>
```

"<http://jsfiddle.net/jcftsazk/9/>"