var price = $(\'#addprice\').val(); var pass = $(\'#pass\').val(); var total = $(\'#totalprice\').attr(\'value\') var left = $(\'#leftquota\').attr
Another option is to extend jQuery to be able to read numbers directly from form elements
jQuery.fn.numVal = function() { return parseFloat(this.val()) || 0; } .... var price=$('#addprice').numVal(); var pass=$('#pass').numVal()