I\'ve got a layout like this:
3条回答 暖寄归人 (楼主) 2020-12-30 03:59 This is an old thread, but I'm curious* why nobody mentioned nth-child. $("#parent > div:nth-child(n + " + index + ")").remove(); *Update: I didn't have enough rep to know it at the time, but there had been an nth-child answer, deleted. 0 讨论(0) 查看其它3个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
This is an old thread, but I'm curious* why nobody mentioned nth-child.
$("#parent > div:nth-child(n + " + index + ")").remove();
*Update: I didn't have enough rep to know it at the time, but there had been an nth-child answer, deleted.
nth-child