Question: I'm new to jQuery, and maybe I'm going about this all wrong...

I need to select the nth td of every tr, do some math on it (divide the value by 60) and return the new value to the td.

```js
$('#table tbody').find('tr td:eq(2)').text($(this).text() / 60);
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<table>
  <tbody>
    <tr>
      <td>John</td>
      <td>2</td>
      <td>800</td>
      <td>4</td>
    </tr>
    <tr>
      <td>Sally</td>
      <td>5</td>
      <td>610</td>
      <td>9</td>
    </tr>
    <tr>
      <td>Bob</td>
      <td>7</td>
      <td>249</td>
      <td>3</td>
    </tr>
  </tbody>
</table>
```

The jquery docs [give examples](https://api.jquery.com/find/) of manipulating the css this way, so it seems like I'd be able to do that through .text() as well.

The console is not returning any errors, and also executes a console.log afterwards so I know it's continuing, but none of the values change in the DOM.

Should I be using .each() instead of .find()? Any help is appreciated.

Answer: 
You need to use a function argument to `.text()`. The function is called with the old value of the text as an argument, and the return value replaces it.

```
$('#table tbody').find('tr td:nth-child(2)').text(function(i, oldtext)
    return parseInt(oldtext)/60;
});

```

If you don't use a function, `$(this).text()/60` is executed *before* calling `text()`, so it uses whatever `this` is in the calling context.

You also need to use `:nth-child`, not `:eq`, to access the third cell in each row. Otherwise, it just accesses the third cell in the entire result set.
Your code is almost correct, but you need to provide your logic to `text()` in an anonymous function for it to be executed against all matched `td` elements. 

Also note that you can use a single `:nth-child` selector to get the `td` in each row without needing to use `find()` - although the index is then `3`, not `2`, as `nth-child` uses a 1-based index. Try this:

```js
$('table tbody tr td:nth-child(3)').text(function(i, t) {
  return parseInt(t, 10) / 60;
});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
  <tbody>
    <tr>
      <td>John</td>
      <td>2</td>
      <td>800</td>
      <td>4</td>
    </tr>
    <tr>
      <td>Sally</td>
      <td>5</td>
      <td>610</td>
      <td>9</td>
    </tr>
    <tr>
      <td>Bob</td>
      <td>7</td>
      <td>249</td>
      <td>3</td>
    </tr>
  </tbody>
</table>
```

Note that you can use `toFixed()` to set the result to a given number of decimal places, if required.