Exfoliation
{
const children = Array.from($el.children)
const children_products = children.filter((child) => child.classList.contains("filter__product"))
let order = 0
for (let i = 0; i < children_products.length; i++) {
if (children_products[i].dataset.show == "false") {
children_products[i].style.display = "none"
} else {
children_products[i].style.display = ""
children_products[i].style.order = order
order++
}
}
const children_promos = children.filter((child) => child.classList.contains("filter__promo"))
for (let i = 0; i < children_promos.length; i++) {
const index = children.indexOf(children_promos[i])
if (index > -1) {
const next_children_products = children.filter((child) => child.classList.contains("filter__product") && child.dataset.show != "false" && parseInt(child.style.order) > parseInt(children_promos[i].style.order))
if (next_children_products.length > 0) {
children_promos[i].style.display = ""
} else {
children_promos[i].style.display = "none"
}
} else {
console.error("Element not found!")
}
}
}, 5)
'
>
Bright & Easy 3-Minute Flash Mask
Making Moves Milky Cleanser
Fantastic Face Wash
Essential Face Wipes
![Bright & Easy 3-Minute Flash Mask](http://www.ursamajorvt.com/cdn/shop/files/2000x2000_PCP_FlashMask_1.jpg?v=1720643384)
A powerful, fast-acting enzyme face mask for clear, vibrant skin.
A powerful, fast-acting enzyme face mask for clear, vibrant skin.
Rated 4.7 out of 5 stars
4.7 Stars (161 Reviews)
![Making Moves Milky Cleanser](http://www.ursamajorvt.com/cdn/shop/files/00_UM_MC_WithBox_OnWhite_2000x2000_1.jpg?v=1720643332)
An easy-rinsing, enzyme-powered facial milk for clean, hydrated skin.
An easy-rinsing, enzyme-powered facial milk for clean, hydrated skin.
Rated 4.5 out of 5 stars
4.5 Stars (363 Reviews)
![Fantastic Face Wash](http://www.ursamajorvt.com/cdn/shop/files/2000x2000_FaceWash_FullSize_2.jpg?v=1720645952)
A super fresh foaming face wash for clean, balanced skin.
A super fresh foaming face wash for clean, balanced skin.
Rated 4.7 out of 5 stars
4.7 Stars (1,487 Reviews)
![Essential Face Wipes](http://www.ursamajorvt.com/cdn/shop/files/00_PDP_FaceWipes_01-OnWhite_Full-Size_2000x2000_1.jpg?v=1720643374)
Individually-wrapped bamboo face wipes to refresh skin on the go.
Individually-wrapped bamboo face wipes to refresh skin on the go.
Rated 4.8 out of 5 stars
4.8 Stars (706 Reviews)