In my javascript experience, I found that is a very common task \"searching the nearest ancestor of an element with some condition (tag name, class,...)\". Can the parents(
closest() starts at current element, if the parent you are looking for has the same tag as current (eg. both are divs), use parent().closest()