In cities having a mayor, or like officer, with the veto power, when the passage of an ordinance petitioned for by the voters is vetoed, the failure of the legislative body to pass the ordinance over the veto shall be deemed a refusal of the legislative body to pass the ordinance within the meaning of this article.