Local authorities by ordinance and the department by erecting appropriate traffic-control devices, are hereby empowered within their respective jurisdictions to prohibit pedestrians from crossing any highway except in a crosswalk.