jQuery(document).ready(function (){ var tamount = jQuery('.confirmationtable :first tr:nth-child(2) td:last').text().replace('$', ''); var qun = jQuery('.confirmationtable :first tr:nth-child(2) td:nth-child(2)').text(); var pgamount = parseFloat(jQuery('.confirmationtable :first tr:last-child td:last').text().replace('$', '')); var amt = ((2 / 100 ) * pgamount).toFixed(2); var gtotal = parseFloat(pgamount) - parseFloat(amt); /*var tr_data = "
If payment method selected is A. Payment by Cheque then discounted price will be $"+gtotal+"
"); });