`.parent()` is fragile as it depends on depth. instead do `.closest('...')`.