Body
{
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)
'
>
Morning Mojo Bar Soap
Base Layer Deodorant
Hoppin' Fresh Deodorant
Perfect Zen Body Lotion
Citrus Riot Body Wash
Go Easy Shampoo
Go Easy Conditioner
Stellar Shave Cream
Sublime Sage Spray Deodorant
Forest Fix Deodorant
Haircare Heroes Bundle
Hoppin’ Fresh Deodorant Three-Pack
Morning Mojo Three-Pack
Super Shower Set
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 (211 Reviews)
An unscented aluminum and baking soda-free stick deodorant.
An unscented aluminum and baking soda-free stick deodorant.
Rated 4.4 out of 5 stars
4.4 Stars (103 Reviews)
A crisp, cooling aluminum and baking soda-free stick deodorant.
A crisp, cooling aluminum and baking soda-free stick deodorant.
Rated 4.3 out of 5 stars
4.3 Stars (369 Reviews)
A blissful, hydrating body lotion with an uplifting scent.
A blissful, hydrating body lotion with an uplifting scent.
Rated 4.5 out of 5 stars
4.5 Stars (145 Reviews)
A foaming gel body wash with a punchy, citrus-infused aroma.
A foaming gel body wash with a punchy, citrus-infused aroma.
Rated 4.1 out of 5 stars
4.1 Stars (98 Reviews)
A luxurious, moisturizing daily shampoo for healthy hair.
A luxurious, moisturizing daily shampoo for healthy hair.
Rated 4.6 out of 5 stars
4.6 Stars (207 Reviews)
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 (102 Reviews)
A deeply nourishing, non-lathering shave cream.
A deeply nourishing, non-lathering shave cream.
Rated 4.7 out of 5 stars
4.7 Stars (143 Reviews)
An aluminum-free spray deodorant with a bright, herbaceous scent.
An aluminum-free spray deodorant with a bright, herbaceous scent.
Rated 4.5 out of 5 stars
4.5 Stars (106 Reviews)
A forest-fresh aluminum and baking soda-free stick deodorant.
A forest-fresh aluminum and baking soda-free stick deodorant.
Rated 4.5 out of 5 stars
4.5 Stars (42 Reviews)
MADE TO:
Keep hair soft, shiny, & manageable.
Get soft, shiny, manageable hair.
CONTAINS:
Shampoo + conditioner
Shampoo + conditioner
Rated 4.5 out of 5 stars
4.5 Stars (372 Reviews)
2 items
MADE TO:
Keep you fresh all day long!
A stash of freshness to keep or share.
CONTAINS:
Three Hoppin’ Fresh Deodorants
Three Hoppin’ Fresh Deodorants
Rated 4.3 out of 5 stars
4.3 Stars (380 Reviews)
3 items
MADE TO:
Wake you up with invigorating freshness.
Invigorating freshness to start your day.
CONTAINS:
Three Morning Mojo Bar Soaps
Three Morning Mojo Bar Soaps
Rated 4.8 out of 5 stars
4.8 Stars (219 Reviews)
3 items
MADE TO:
Give you clean, comfortable skin.
Feel clean and comfortable in your skin.
CONTAINS:
Body wash + body lotion
Body wash + body lotion
Rated 4.3 out of 5 stars
4.3 Stars (244 Reviews)
2 items