closest() will get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. But I want
closest()
Vanilla js:
el.parentElement.closest('.container')
Jquery:
el.parent().closest('.container');