title: Dealing with scroll bars and jquery .width() method
body: <p>jQuery's <code>.width()</code> method doesn't seem to account for scroll bars. This is problematic for me, since I'd like to set the width of some children to equal the width of their parent. I used jQuery similar to the following:</p>
  
  <pre><code>$('#contentDiv').width($('#containerDiv').width())
  </code></pre>
  
  <p>In this example, <code>#contentDiv</code> is the element I'd like to size, and I want to set it to have the width of <code>#containerDiv</code>, which is its parent element. My problem is that this cuts off the side of <code>#contentDiv</code>, as seen in <a href="http://jsfiddle.net/NbpFM/" rel="noreferrer">this fiddle.</a></p>
  
  <p>In my actual code, I have several elements that I'm sizing with jQuery, which all need to fit in the scrollable div, so just setting the css of <code>#contentDiv</code> to 100% is not an option. What's the best way of dealing with scroll bar widths of divs in jQuery?</p>