Hey all,
I have a simple variable:
var spanId = 'hi';
Now, I want to generate this:
$('#hi')
using the variable.
So I tried:
$('#' + spanId)
But that didn't work. Any suggestions?
Thanks, Amit
Hey all,
I have a simple variable:
var spanId = 'hi';
Now, I want to generate this:
$('#hi')
using the variable.
So I tried:
$('#' + spanId)
But that didn't work. Any suggestions?
Thanks, Amit