$('.block').show(500);
foreach($result as $cat) {
echo $cat['category'];
foreach($cat['data'] as $item) {
echo $item['price'];
}
}
.parent {
display: flex;
flex-wrap: wrap;
}
@supports (column-count: 3) or
(-moz-column-count: 3) or
(-webkit-column-count: 3) {
.parent {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
display: block;
flex-wrap: unset;
}
}
.item {
width: 33.33%;
}
@supports (column-count: 3) or
(-moz-column-count: 3) or
(-webkit-column-count: 3) {
.item {
display: inline-block;
page-break-inside: avoid;
width: 100%;
}
}