title: Unable to get offset of an element
body: <p>I am trying to get offset of some elements which is working fine for me. But the problem occurs if element id contains single quotes. It throw an error, e.g, if the element id is whats_next its working fine.
  But if id is what's_next if gave me an error.</p>
  
  <pre><code>Error: Syntax error, unrecognized expression: #What's_Next
  
  ....value:null},t.error=function(e){throw new Error("Syntax error, unrecognized exp...
  </code></pre>
  
  <p>Also I don't have access over HTML I can not change the HTML. Do you guys have any solution for this ?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$('.custom-toc li a').click(function(){
    var id = $(this).attr('href');
    console.log(id);
     console.log($(id).offset());
  });
  </code></pre>
  
  <p>HTML of element where I am clicking:</p>
  
  <pre><code>&lt;a rel="internal" href="#What's_Next"&gt;What's Next&lt;/a&gt;
  </code></pre>
  
  <p>HTML of element offset element:</p>
  
  <pre><code>&lt;span id="What's_Next"&gt;&lt;/span&gt;
  &lt;h4 class="editable"&gt;What's Next2&lt;/h4&gt;
  </code></pre>