I am trying to use the escape function to escape from a single quote:
var tagDesc = "Workers'_Compensation"; tagDesc = escape(tagDesc); $("#" + tagDesc + ".tag").css("display", "none");
The escape function replaces the single quote %27 with "Workers%27_Compensation" .
So, I get an error message,
Microsoft JScript runtime error: syntax error, unrecognized expression: # Workers% 27_Compensation.tag
source share