I have a variable called counter
, which represents the id
of an element.
How would I select this variable's value e.g. the div
with the id
, which is the value of the variable, in jQuery?
counter = counter + 1;
$('<a> </a>').hover( function() {
$(#/*id is the value of variable counter*/).
}