My first adventure with trying to do some transformations of my map on click events. It got pretty sloppy and I was kept re adding rectangles because I was setting them to display:none and I guess there's no going back from that. http://svg-whiz.com/svg/HideShow.svg
I did get the So Cal bounding box to come back without redrawing but decided not to fix all of it because it's a weird example of different ways of doing stuff. Even if it's a bit of a mess I think I can learn something from it.
Click on the Bay Area to zoom in then on the green box to zoom back out and then repeat to your hearts desire.
Better yet show me how I should have coded it....
The map is of California Congressional Assembly Districts until 2020.
Modified http://d3js.org/d3.v3.js to a secure url
Modified http://d3js.org/topojson.v1.min.js to a secure url
https://d3js.org/d3.v3.js
https://d3js.org/topojson.v1.min.js