Right, what they do in the question you posted in the comments, is just marking a row when it's clicked. That's not really what focus
means in webdevelopment... Anyway, they just toggle a css class to achieve the result, like this (click on a table cell to see what it's doing):
jQuery(document).ready(function($) {
$('td').on('click', function(e) {
$(this).toggleClass('focus');
});
});
table { border-collapse: collapse; }
td, th { border: 1px solid #000; padding: 5px; }
td.focus { background: red; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>email</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Pete</td>
<td>pete@gmail.com</td>
</tr>
<tr>
<td>2</td>
<td>John</td>
<td>john@live.com</td>
</tr>
<tr>
<td>3</td>
<td>Bill</td>
<td>bill@yahoo.com</td>
</tr>
<tr>
<td>4</td>
<td>Dave</td>
<td>dave@gmail.com</td>
</tr>
</tbody>
</table>