0

About popups

Hello everyone, I'm Brazilian and I'm trying to make popups exactly to the left of each 'SVG'. It's possible?? Because when I press the "information buttons", the popup appears at the very top. And when I press on others, instead of appearing near the "info buttons" appear in an unwanted place . Appreciate :) https://code.sololearn.com/W4A4j4fOVjDL/?ref=app

5th Jul 2020, 9:11 PM
João Hoffman
João Hoffman - avatar
2 Respostas
+ 1
You could use popper js, a library to place poppers. Works nicely. :-)
6th Jul 2020, 1:06 PM
Arnesh
Arnesh - avatar
0
You should never have multiple elements with the same is, id's are unique, classes are for multiple elements. You can use onclick="func(event)" to pass the event object to your function. From there you can access event.target to see what element triggered the function. also event.target.id to see the id of the triggering element.
6th Jul 2020, 6:19 AM
JME