Towns such as Riverside , N.J. , Hazleton , Pa . , and Escondido , Calif . , have passed , then repealed , ordinances aimed at illegal immigrants -- or suffered costly legal setbacks in defending the policies .