Parentsuntil sans jQuery


const closestElement = targetElement.closest(".parent_element");
KostasX