title: how to get the text width?
body: <p>I have the following situation.</p>
  
  <pre><code> &lt;ul&gt;
        &lt;li&gt;&lt;span&gt; text &lt;/span&gt;&lt;/li&gt;
   &lt;/ul&gt;
  </code></pre>
  
  <p>I use the following jquery to get the text content and width...</p>
  
  <pre><code>  $("ul li").each(function()
    {
         var textIndex = $(this).index();
         var $text = $(this).find("span").text()  // this works..
         var textWidth = $text.width(); // this does not work..
    });
  </code></pre>
  
  <p>How do I get the text Width along with getting its index, and text data?</p>