title: Jquery Math operation not working
body: <p>I am trying to validate data of two textboxes. I have this textbox for submitted amount.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="col-md-3"&gt;
      &lt;label for="SubmittedAmountTextBox"&gt;Total Submitted Amount&lt;/label&gt;
      &lt;Everest:AmountTextBox runat="server" ID="SubmittedAmountTextBox" TriggerDenomination="True" autocomplete="off" CssClass="loan-amount-input submitted-amount"&gt;&lt;/Everest:AmountTextBox&gt;
      &lt;asp:RequiredFieldValidator runat="server" ID="SubmittedAmountTextBoxRequiredFieldValidator" Display="Dynamic"
                                              ErrorMessage="Required" ControlToValidate="SubmittedAmountTextBox" CssClass="alert alert-error" Style="padding: 5px;" SetFocusOnError="true" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And an another textbox from a usercontrol.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="col-sm-2"&gt;
      &lt;asp:TextBox runat="server" ID="LoanCollectionBalanceTextBox" CssClass="form-control input-sm" data-bind-property="CollectionBalance" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>An ajax call gets all the data for the textbox. I am just trying to through a bootbox alert if <code>SubmittedAmountTextBox</code> input is greater then <code>LoanCollectionBalanceTextBox</code>.</p>
  
  <p>My Jquery Function for Validation:</p>
  
  <pre class="lang-js prettyprint-override"><code>  function validateAmount() {
        var sbmtAmount = $('#SubmittedAmountTextBox').val();
        console.log(sbmtAmount);
        var loancollecBlnce = $('#LoanCollectionBalanceTextBox').val();
  
        if (sbmtAmount &gt; loancollecBlnce) {
            alert(sbmtAmount);
            alert(loancollecBlnce);
            debugger;
            //bootbox.alert("Submitted amount is higher then Collection Balance")
            $("#SaveButton").attr('disabled', 'disabled');
        } else {
            $("#SaveButton").attr('disabled', false);
        }
    }
  </code></pre>
  
  <p>And the Blur event of <code>SubmittedAmountTextBox</code></p>
  
  <pre class="lang-js prettyprint-override"><code> $('#SubmittedAmountTextBox').on('blur', function (evt) {
       var checkedValue = $('input[id*=loanTypeCheck]:checked').val();
       if (checkedValue === "Cash") {
           $(this).trigger('showDeno', [$(this)]);
       } else if (checkedValue === "Dharauti") {
           validateAmount();
       }
   });
  </code></pre>
  
  <p>And the weird part is it does validate if the <code>SubmittedAmountTextBox</code> > <code>LoanCollectionBalanceTextBox</code>. Suppose <code>LoanCollectionBalanceTextBox</code> is 12500 and if i enter more then that it throws the alert. And if i enter 100 it does not because 12500 > 100 but if i enter 200, 300 anything between 1000 it does throw the error. I searched everwhere couldn't get hang of this.</p>