jQuery for removing rows of a table
I have a javascript for checking if the table has the same number of rows
as that in the select option, if not then delete those rows, so i wrote
the following
if(segmentTable.rows.length > counter){
var rowLen = segmentTable.rows.length;
var delIndex = 1;
for(i = 0; i <= rowLen ; i++ ){
if(i > counter){
segmentTable.deleteRow(i-delIndex);
delIndex++;
}
}
}
but i want a jQuery for doing same, can you help me write one ? thanks in
advance.
No comments:
Post a Comment