Pass element instead of id