title: Get the width in pixels of an element using jquery
body: <p>I want to get the width of an element including border, margin and padding.</p>
  
  <p>I know using <code>$(input).width()</code> or <code>$(input).css('width')</code> give the width of the element.</p>
  
  <p>But here is the requirement. </p>
  
  <p>Suppose I created a text box like follows:</p>
  
  <pre><code>&lt;input type='text' id='txtBox' name='txtBox' style='width:100%' /&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;input type='text' id='txtBox' name='txtBox' style='width:auto' /&gt;
  </code></pre>
  
  <p>If I get the width using either $input.css('width') or $input.width(). I am not able to get the width in pixels. I am using jquery1.3.2.</p>