I want to select an input box which has the following ID:
id="Peoples' Choice"
If I manually type in the selector with escape characters, it works:
$("[id='Peoples\\' Choice']")
But if I use a variable, it doesn't seem to work:
var theID = "Peoples' Choice";
var sel = "[id='" + theID + "']"
chk = $(sel);
This spews out a syntax error saying unrecognized expression.
I even tried replacing the quote in theID
with double-backslash+quote.
Help?