For a markup like
div 1 div 2 div 3 6条回答 时光取名叫无心 (楼主) 2020-12-13 09:30 Try the CSS selector :nth-child(): $("#holder > div:nth-child(2)").after("foobar"); See also the example on the jQuery page of the :nth-child() selector. 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Try the CSS selector :nth-child():
$("#holder > div:nth-child(2)").after("foobar");
See also the example on the jQuery page of the :nth-child() selector.