A
A
Anton Egorychev2015-06-14 17:02:21
JavaScript
Anton Egorychev, 2015-06-14 17:02:21

How to change the element class (path) of an SVG inserted into a document when a DIV is clicked?

Hello.
I'm making an interactive map. You need to set up the interaction between the map and the list of dealers.
At the moment, the interaction is implemented partially. When you click on the checkbox in the list of dealers, the corresponding region is highlighted on the map. This is not very convenient and beautiful, I want to make the region highlighted when clicking on a DIV in the list of dealers, and when clicking on the next, previous one, it ceases to be selected.
Can you please tell me how to implement this?
Also, tell me how to implement pop-up hints in the same project, which will display information from the same list of dealers, for the corresponding region.
Demo - sngmap.ucoz.net/index.html Thanks
in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2015-06-14
@Petroveg

How to assign class to svg path attribute using js?
Here is an example of externally controlling SVG elements .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question