kumar
kumar

Reputation: 2944

how to loop all rows in jquery grid

I have this code right now to get the row value from jquery grid..

$("#table1").click(function(e) {
                var row = jQuery(e.target).parent();
                value = row.attr("id");

I need to loop all the rows to get the values.

Can anyone help me out that? if I click on second row I need get second row value, if I click on first row I need to get first row value.

Upvotes: 0

Views: 678

Answers (1)

Simeon
Simeon

Reputation: 5579

Try this:

$('tr', '#table1').live('click', function(){
    var id = $(this).attr('id');
});

Upvotes: 1

Related Questions