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
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
![Morning Mojo Bar Soap](http://www.ursamajorvt.com/cdn/shop/files/PDP_MorningMojo_Barsoap_2000x2000_PCP_1.jpg?v=1720643327)
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 (220 Reviews)
![Ursa Major Hoppin' Fresh Deodorant](http://www.ursamajorvt.com/cdn/shop/products/1544FKO43BURSAMAJORUM_ECOM_191212_TravelSize_Deodorant_HoppinFresh_wCap.jpg?v=1586545995)
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 (415 Reviews)
![Perfect Zen Body Lotion](http://www.ursamajorvt.com/cdn/shop/files/PDP_BodyLotion_2000x2000_PCP_1.jpg?v=1720643313)
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 (149 Reviews)
![Citrus Riot Body Wash](http://www.ursamajorvt.com/cdn/shop/files/PCP_FlipCap_BodyWash_2000x2000_PCP_1.jpg?v=1720643373)
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 (104 Reviews)
![Go Easy Shampoo](http://www.ursamajorvt.com/cdn/shop/files/PDP_Shampoo_2000x2000_PCP_1.jpg?v=1720643344)
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 (213 Reviews)
![Go Easy Conditioner](http://www.ursamajorvt.com/cdn/shop/files/PDP_Conditioner_2000x2000_PCP_1.jpg?v=1720643346)
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 (108 Reviews)
![Stellar Shave Cream](http://www.ursamajorvt.com/cdn/shop/files/00_PDP_ShaveCream_2000x2000_PCP_1.jpg?v=1720643314)
A deeply nourishing, non-lathering shave cream.
A deeply nourishing, non-lathering shave cream.
Rated 4.6 out of 5 stars
4.6 Stars (149 Reviews)
![Sublime Sage Spray Deodorant](http://www.ursamajorvt.com/cdn/shop/files/UM_FullSize_Deodorant_SublimeSageSpray_WhiteBG_2000x2000_PCP_1.jpg?v=1720643309)
An aluminum-free spray deodorant with a bright, herbaceous scent.
An aluminum-free spray deodorant with a bright, herbaceous scent.
Rated 4.4 out of 5 stars
4.4 Stars (121 Reviews)
![Ursa Major Forest Fix Deodorant](http://www.ursamajorvt.com/cdn/shop/products/1544_FKO_08C_URSA_MAJOR_UM_ECOM_191212_FullSize_Deodorant_ForestFix_wCap.jpg?v=1586545972)
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 (55 Reviews)
![Haircare Heroes Bundle](http://www.ursamajorvt.com/cdn/shop/products/1544-FKO-26C-URSA-MAJOR-UM_ECOM_191212_FullSize_HairBundle.jpg?v=1646069186)
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 (395 Reviews)
2 items
![Hoppin’ Fresh Deodorant Three-Pack](http://www.ursamajorvt.com/cdn/shop/products/Untitleddesign_12.png?v=1668117027)
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.4 out of 5 stars
4.4 Stars (401 Reviews)
3 items
![Morning Mojo Three-Pack](http://www.ursamajorvt.com/cdn/shop/files/Morning-Mojo-3-Pack-PCP-2000x2000.jpg?v=1698884309)
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 (233 Reviews)
3 items
![Super Shower Set](http://www.ursamajorvt.com/cdn/shop/files/Body-Wash-_-Body-Lotion-PCP-2000x2000.jpg?v=1698884547)
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 (254 Reviews)
2 items