title: jquery / javascript setting width fails
body: <p>I have encountered this problem:
  Depending on numbers from  I want to create a bar chart. Interestingly it works very well in IE8 set on quirks mode, but fails everywhere else. I cannot really say where the error is and I hope that someone here can help me. I am using jQuery, but using getElementById() and element.style.width = Somevalue (i.e. without jQuery) did not work either :(</p>
  
  <p>[Edit: Full example link removed; the pastie expired.]</p>
  
  <p>Basically:</p>
  
  <pre><code>&lt;input onChange="calculateField(1)" ...&gt;
  
  function calculateField(fieldname){
      value = $("#input_" + fieldname).val();
      fancyMagic();
      value = 6 * value; // for testing
  
      $("#subtotal_" + fieldname).html(value);
      updateDiagram();
  }
  
  function updateDiagram(){
      // gather required into, maxwidth, maxval, etc...
  
      // fetch 'normal' bar
      var target = $("#animatebar_1");
      var width = maxwidth * (value / maxval);
  
      // set width to proper width
      target.width(width);
  
      // like for avg bar
      var avgtarget = $("#avgbar_1");
      var avgwidth = maxwidth * (averagevalue / maxval);
      avgtarget.width(avgwidth);
  }
  </code></pre>
  
  <p>I tried all of FF, IE8 in various settings and Opera and it simply doesn't work. The bar's width is set to zero immediately after. IE8 quirks mode works, interestingly.</p>
  
  <p>I am pretty sure it's just me being dumb, but I will appreciate help with this. I also tried to use .css() to change the size, but it did not work either.</p>
  
  <p>Thank you muchly in advance.</p>