I'm trying to add the attribute "flex-direction: column" to the div projekt-cont when the checkbox is checked and cannot get it to work. i have read that i can't change the parents attributes using css but i don't know how to use js
<div class="sort-cont">
<div class="slider-label">Nyast först</div>
<label class="switch">
<input type="checkbox">
<span class="slider round"></span>
</label>
<div class="slider-label">Äldst först</div>
</div>
<div class="projekt-cont">