我想知道有多少div
兄弟姐妹的h3
标签位于类的父div
级内content-block-infos-events
如果其中一些数量少于 6 个项目,我想创建 divs 标签,这样我总是可以在每个项目之后达到 6 个项目h3
例如 :
<div class="content-block-infos-events" >
<h3>H3 val</h3>
<div class="views-row rows>
TEXT 1
</div>
<div class="views-row rows>
TEXT 2
</div>
// i have to add 4 another <div class="views-row rows>
<h3>H3 val</h3>
<div class="views-row rows>
TEXT 1
</div>
<div class="views-row rows>
TEXT 2
</div>
<div class="views-row rows>
TEXT 3
</div>
<div class="views-row rows>
TEXT 4
</div>
<div class="views-row rows>
TEXT 5
</div>
<div class="views-row rows>
TEXT 6
</div>
// no need to add the div because i have 6 divs
</div>
在这里你可以找到 html 代码:http: //jsfiddle.net/Axdh6/2/