Adding values of multiple text box values
<p>I have multiple text boxes with a class name <code>.paymentamount</code>.i want to add all values of text boxes of the same class but i am getting error nan.Code is this</p>

<pre><code>function paymentData()
{
    $('.paymentamount').keyup(function(){
        var amountSum=0;
        $('.paymentamount').each(function(){
            amountSum+=parseInt(this.value);
        //console.log(this.value);
        });
        console.log(amountSum);

        });
}
</code></pre>
