title: jQuery Conditional Decimal Greater Than Comparison
body: <p>I have an odd issue that I'm not sure quite how to fix, but here it goes.</p>
  
  <p>I've got a return from an AJAX query and this is how two parts are returned (and how they look in the preview panel):</p>
  
  <pre><code>id:1
  paid: "158.40"
  balance: "79.20"
  </code></pre>
  
  <p>So initially I had just tried the following (after noticing an issue):</p>
  
  <pre><code>if(item.balance &gt; item.paid){
     var test = "balance greater than paid";
  }else{
     var test = "balance is not";
  }
  </code></pre>
  
  <p>But in the above case, it returns the first <code>test</code> meaning that somewhere, the it thinks that 79.20 is greater than 158.40, which is obviously not what I want.</p>
  
  <p>So I tried this:</p>
  
  <pre><code>var paid = parseFloat(item.paid).toFixed(2);
  var balance = parseFloat(item.balance).toFixed(2);
  </code></pre>
  
  <p>And just switch the first line of the above conditional statement to <code>if(balance &gt; paid)</code> and it still did the same thing...</p>
  
  <p>So I am at a loss, if anyone can help - I'd be very appreciative.</p>