VALUE OF FIRST TD OF EACH ROW USING JQUERY [Resolved]

Posted by Nksingh420 under ASP.NET MVC on 1/25/2014 | Points: 10 | Views : 6850 | Status : [Member] | Replies : 1
I have one drop-down and its changed event i get one table now i want to fetch value of first td and second td of each row using jquery and also multiply and show value in third td of each row.



Thanks in advance




Responses

Posted by: kgovindarao523-21772 on: 1/26/2014 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Hi,
Try this code.

$(document).ready(function(){

$("#IDDropdown").change(function(){

$("#IDTable tr").each(function(){
var v1=$(this).find("td:eq(0)").text();
var v2=$(this).find("td:eq(1)").text();
var v3=$(this).find("td:eq(2)");
v3.text(parseInt(v1)*parseInt(v2));
});

});
});


Thank you,
Govind

Nksingh420, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response