title: compare two values with jquery
body: <p>I'm trying to check a value from two text fields with <strong>JQuery</strong>. I need to compare the dollar amounts to see if the new entered value is greater than the original amount. The outcome is not what I'm expecting at all. The first value is pre populated via PHP <code>OrigAMTVal</code> and the second value <code>amtTOrefundVal</code>is entered by the user. Here's the code:</p>
  
  <pre><code>$('#doREFUND').on("click", function() {
      var amtTOrefundVal = $('.amtTOrefund').val();
      var OrigAMTVal     = $('.CustomerOrderTotal').val();
  
      var doamtTOrefund  = parseInt(amtTOrefundVal).toFixed(2);
      var doOrigAMT      = parseInt(OrigAMTVal).toFixed(2);
  
      if( doamtTOrefund &gt; doOrigAMT ) {    
          var balance = OrigAMTVal - doamtTOrefund;
          alert("BAD: $" + balance + " Over Limit");
      } else {
          var balance = OrigAMTVal - doamtTOrefund;
          alert("GOOD: $" + balance + " Left to Go");
      }
  });
  </code></pre>
  
  <p>Here's a fiddle:
  <a href="http://jsfiddle.net/dM2Fr/2/" rel="nofollow">http://jsfiddle.net/dM2Fr/2/</a></p>
  
  <p>I know I'm missing something, but I can't figure it out.</p>