Partnership
{
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 = ""
}
} else {
console.error("Element not found!")
}
}
}, 5)
'
>
Fantastic Face Wash
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,529 Reviews)
Hoppin' Fresh Deodorant
A crisp, cooling aluminum and baking soda-free stick deodorant.
A crisp, cooling aluminum and baking soda-free stick deodorant.
Rated 4.4 out of 5 stars
4.4 Stars (433 Reviews)
Brighten Up Vitamin C Serum
A concentrated, corrective serum for even-toned, radiant skin.
A concentrated, corrective serum for even-toned, radiant skin.
Rated 4.4 out of 5 stars
4.4 Stars (1,490 Reviews)
1 FL OZ
Essential Face Wipes
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 (722 Reviews)
Go Easy Shampoo
A luxurious, moisturizing daily shampoo for healthy hair.
A luxurious, moisturizing daily shampoo for healthy hair.
Rated 4.7 out of 5 stars
4.7 Stars (218 Reviews)
8 FL OZ
Essential Face Tonic
The multitasker that cleanses, exfoliates, soothes, & hydrates.
The multitasker that cleanses, exfoliates, soothes, & hydrates.
Rated 4.8 out of 5 stars
4.8 Stars (376 Reviews)
Go Easy Conditioner
A light, nourishing conditioner for hydration and control.
A light, nourishing conditioner for hydration and control.
Rated 4.4 out of 5 stars
4.4 Stars (110 Reviews)
8 FL OZ
Morning Mojo Bar Soap
An energizing and exfoliating bar soap that’ll wake you right up.
An energizing and exfoliating bar soap that’ll wake you right up.
Rated 4.8 out of 5 stars
4.8 Stars (227 Reviews)
5 OZ
Bright & Easy 3-Minute Flash Mask
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 (164 Reviews)
1.57 FL OZ
Stellar Shave Cream
A deeply nourishing, non-lathering shave cream.
A deeply nourishing, non-lathering shave cream.
Rated 4.6 out of 5 stars
4.6 Stars (150 Reviews)
5 FL OZ