Answer the question
In order to leave comments, you need to log in
Is it possible to make a jQuery selection from an SVG map?
Good day. The task was to make an interactive map of the office building. Only the main problem is that when renting an office, its color on the map should change. The admin himself will not be able to edit the files. The whole thing must be integrated into WordPress and when editing a post, the busy / free checkbox must be ticked. It's not a problem to do this through arbitrary fields, but how to change the color on the map. I came up with the idea through jquery to select the office I need and if, for example, office 112 - in an arbitrary field the value is "busy", then change the color using jquery methods. Now the task is how to properly select from a DOM tree with an SVG map. I can’t find any clues on what principle to choose offices, since there is no name or id in the path, only the stroke and fill attributes are present. I do it on Raphael.
I am attaching a screenshot:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question