Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
100
rated 0 times [  102] [ 2]  / answers: 1 / hits: 18518  / 11 Years ago, fri, october 4, 2013, 12:00:00

I need to loop through all rows for a particular table, and I have done it as below. At one point, I need to remove the matching table row. I couldn't figure out how to skip the first row and loop through all others. My code below is looping through all tr's.



$('#tbl_dynamic_call_dates > tbody  > tr').each(
function() {
console.log($(this).find('td:first').text());
if($.inArray($(this).find('td:first').text(),array) == -1){
$(this).remove();
}

More From » jquery

 Answers
1
$('#tbl_dynamic_call_dates > tbody  > tr').not(:first).  [....]


to get everything BUT the first






$('#tbl_dynamic_call_dates > tbody  > tr:first'). [...]


or



$('#tbl_dynamic_call_dates > tbody  > tr').first(). [...]


to only get the first


[#75227] Thursday, October 3, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iliana

Total Points: 246
Total Questions: 109
Total Answers: 82

Location: Palestine
Member since Tue, Jul 20, 2021
3 Years ago
;