For a markup like
div 1 div 2 div 3 6条回答 既然无缘 (楼主) 2020-12-13 09:29 Try it like this: $("#holder > div:nth-child(2n)").after("insert here"); It will insert the insert here after every 2nd row: $("#holder > div:nth-child(2)").after("insert here"); 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Try it like this:
$("#holder > div:nth-child(2n)").after("insert here");
It will insert the insert here after every 2nd row:
insert here
$("#holder > div:nth-child(2)").after("insert here");