jquery updating multiple text input
<p>im trying to update all fields, but seem it didnt work? is there anything wrong in the code?</p>

<pre><code>&lt;tr id="1"&gt;&lt;td&gt;&lt;input type="text" id="pro_1"&gt;&lt;input type="text" id="sales_1"&gt;&lt;/td&gt;&lt;/tr&gt; //
&lt;tr id="2"&gt;&lt;td&gt;&lt;input type="text" id="pro_2"&gt;&lt;input type="text" id="sales_2"&gt;&lt;/td&gt;&lt;/tr&gt; //
&lt;tr id="3"&gt;&lt;td&gt;&lt;input type="text" id="pro_3"&gt;&lt;input type="text" id="sales_3"&gt;&lt;/td&gt;&lt;/tr&gt; //

$('#save_products').live('click',function() {
        var $inputs = $('#form').find("input[type=text]");
        $inputs.each(function(){
            var counter = $inputs.length;
            var pro_id = $(this).closest.parent("tr").pro_id; //&lt;--
            var pro_value = $(this).find('pro_'+pro_id).attr("value");
            var sales_value = $(this).find('sales_'+pro_id).attr("value");
            $.post("include/setting.php?save",{id:pro_id, pro_value:pro_value, sales_value:sales_value, count:counter}, function(data){
                if(data.success) {
                      $('.err_message').html(data.message).addClass('ok').fadeIn('slow');         
                } else {$('.err_message').html(data.message).addClass('error').fadeIn('slow');}
            },"json");
        })
        return false;
    });
</code></pre>
