There is an output of elements through the construction each in Jade. I need to wrap every 2 elements in a div-parent, how can this be implemented? I wrote the following code:
each item,i in feature.items - if (i.substr(4)%2) { .col-group .col-mb-8.col-tb-12.col-dt-6 h4.b--feature__title!=item.title pb--feature__text!=item.text - } else { .col-mb-8.col-tb-12.col-dt-6 h4.b--feature__title!=item.title pb--feature__text!=item.text - } But it does not work correctly and wraps only the first .col-mb-8 element out of two in the .col-group . How to add the second?