SVG-MAP Exercise

Country:
Capital:
I have a single click handler attached to the entire SVG image - when a single country node is clicked the event travels up and hits the event handler, which uses the id of the click target as a path variable for the API to fetch data for one specific country based on its isocode. I use DOM-manipulation to populate the info fields with the successfully retrieved data after fetching. And also to change colors on clicked countries and hide/show the info box depending on wheteher a country or something else is clicked.
GO BACK