I
I
inpokon2019-01-05 11:53:18
SVG
inpokon, 2019-01-05 11:53:18

Working with svg object. How to pull elements into js file of html document?

I have an SVG of a house plan. He looks like this 5c307121c772c224765574.png.
The SVG file itself is 995 KB. If you insert it directly into html, it turns out that, as a result, my index html file hangs a little more than 1 mb. Which is not good for page loading.
I insert through object but now I cannot pull out id from there. Since I need interaction between my html document and SVG. So that when you hover over a certain element in SVG, you need to change the value in html. If you insert into html, then everything works well, but the size of the index html increases, which I don’t really like.
How to be in such a situation?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question