Question: So I have a jquery event that is inside of `$(document).ready(function() { //.....// });`. It has the following code:

```
$('.puzzle_cells').keyup(function(event) {

});

```

The next thing I need to do is get the ID of the `<input>` element with a class `'puzzle_cells'` (BTW every `<input>` with a class of `'puzzle_cells'` has an ID). Naturally I would use the `this` variable, but I can't figure out how to get it into a jquery `.attr('id')` function.

To make sure it's clear, I need the id of the '.puzzle\_cells' that was typed in.

**UPDATE:** Sorry everyone, actually it wasn't the `<input>`s that had IDs but the parent `<td>` that did for each one. So, I switched my code from `$(this).attr('id');`to `$(this).parent('td').attr('id');` and it works now. I can't really try `this.id` because of the parent thing, but I'm sure it works.

Answer: 
```
$('.puzzle_cells').keyup(function(event){

   this.cellID = event.srcElement.id;

});

```

Not very familiar with JQuery, but this should work.
Just use `$(this).attr("id")` like any other element

```
$('.puzzle_cells').keyup(function(event) {
   console.log($(this).attr("id"));
});

```

[JSfiddle](http://jsfiddle.net/CA5EY/)