$('#productTable tr').each(function(i){ if(i>=1){ var price = $(this).children('td').eq(3).text(); var successPrice = $(this).children('td').eq(4).text(); var number = $(this).children('td').eq(8).children('#tdinput').val(); if(!isEmpty(trim(number))){ var cost = parseInt(price) - parseInt(successPrice); totleCostAmt += cost * number; } } });