[solved] Variable in $("")

[solved] Variable in $("")

Hello, is it possible to get an id with a variable in it?
So, would something like this work? :

function moo(theId) {

$("#idNumber" + theId).text("does this work?");

}


and then it will affect
<div id="idNumber384">hi 384</div>

width this
<a onclick="moo(384)">Get 384</a>

Or is there any other way to get it?

never mind! it works, never expected it to work because it was just a guess