KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got a layout like this: <div id='parent'> <div id='row_0'></div> <div id='row_1'></div> <div id='row_2'></div> ... <div id='row_N'></div> </div> At some point, I want to remove all div "rows" above a certain index, like: for (var index = 1; index < $('#parent').children.length; index++) { $('#parent').remove('#row_' + index); } is there a simpler way to do this in jquery? Something like 'just remove all children starting from index N'? (the above for loop won't really work, but is the kind of thing I would do if there's no other way)
Tags (comma-separated)
Save Edits
Cancel