I have this code snippet:

```
$('#selector1,#selector2').change(function(){
    checkDate(document.getElementById($(this).attr("id")));
});

```

The above works fine, but I want to use jQuery's `$` instead of `document.getElementById`. So, I tried this but it gives me a javascript error: `TypeError: valueToTest is undefined`

```
$('#selector1,#selector2').change(function(){
    checkDate($("#" + $(this).attr("id")));
});

```