jquery get each tr from result data -


$.ajax({     type: 'get',     timeout: 30000,     url: '' + baseurl + '/company/manageworkreport/getgroup',     data: {          groupid: value,          needactiveon: activeon      },         cache: false,     success: function (data) {         if (data) {             // ... 

data are:

<tr><td>...</td></tr><tr><td>...</td></tr><tr><td>...</td></tr> 

i loop result on each tr. this:

$("#mytable tbody tr").each(function() {}); 

however don't know how data variable.

assuming mean request you're making returns html table element data variable, can this:

success: function (data) {     if (data) {         $(data).filter('tbody tr').each(function() {             // each row...         });     } } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -