title: Jquery - .toFixed(2) fixed number reduce to 3 digits
body: <p>I have the following code that works with the exception of limiting the <code>#result2</code> to <code>3 digits</code></p>
  
  <pre><code>current #result2: input 1 and you get 0.010416666666666666
  
  needed #result2: input 1 and get 0.01
  </code></pre>
  
  <p>I need to limit the result to <code>0.00 2 digits</code> after so that it is not a long result.</p>
  
  <p>This is going to be used to convert pixels to inches for designers as part of a pet project.</p>
  
  <p>** What would be really great is if the result would actually convert to inches, 
  example: input 1 and get back 1/8 but not sure if that can be done???</p>
  
  <p>Here is the Html:</p>
  
  <pre><code>&lt;label&gt;Pixels&lt;/label&gt;
  &lt;input class="calcd" id="calc3" type="text" /&gt;
  &lt;input class="calcd" id="calc4" type="hidden" value="96" /&gt;
  &lt;p&gt;Inches&lt;/p&gt;&lt;span id="result2"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Here is the Jquery:</p>
  
  <pre><code>$(document).ready(function(){
  
      $(".calcd").keyup(function(){
  
          var val1 = parseInt($("#calc3").val());
          var val2 = parseInt($("#calc4").val());
  
          if ( ! isNaN(val1) &amp;&amp; ! isNaN(val2))
          {
               $("#result2").text(val1 / val2).toFixed(3);
          }
      });
  
  });
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>Here is the JSFIDDLE: <a href="http://jsfiddle.net/4ZdJL/" rel="nofollow">http://jsfiddle.net/4ZdJL/</a></p>