您可以:nth-child
用来定位每个3,6,9 ... n元素。并在匹配的元素后插入新内容:
$('item inserted ').insertAfter($('li:nth-child(3n+3)'));
- 1 element
- 2 element
- 3 element
- 4 element
- 5 element
- 6 element
- 7 element
- 8 element
- 9 element