title: How to get a pixel width from a span programmatically with jquery
body: <p>I'm trying to do something like:</p>
  
  <pre><code> $('&lt;span&gt;random text in here&lt;/span&gt;').width()
  </code></pre>
  
  <p>But the width it's returning is 0. (The reason I'm trying to do this is to get the pixel width of a given text.)</p>
  
  <p>How would I get this width, programmatically?</p>
  
  <p>Thanks</p>