title: How do I escape a single quote in jQuery?
body: <p>I am trying to use the escape function to escape a single quote:</p>
  
  <pre><code>var tagDesc = "Workers'_Compensation";
  tagDesc = escape(tagDesc);
  $("#" + tagDesc + ".tag").css("display", "none");
  </code></pre>
  
  <p>The escape function replaces the single quote with <code>%27</code> to <code>"Workers%27_Compensation"</code>.</p>
  
  <p>So I get an error,</p>
  
  <blockquote>
    <p>Microsoft JScript runtime error: Syntax error, unrecognized expression: #Workers%27_Compensation.tag</p>
  </blockquote>