Draggable Element

Hey guys,
I found the following tutorial: Create a Draggable Element in JavaScript | KIRUPA

Is it possible to drag the circle and use left and top position in percent (%)? In this tutorial the circle use the transform property.

I need it to drag circles in a specific position to store the position into my database for a custom plugin. (Responsive Map)

Hi @philde - sorry for the massive delay in responding to you.

You can accomplish the same results as top and left by using the transform property itself. Are you running into any issues storing the results?

Cheers,
Kirupa :slight_smile:

Hey :slight_smile: it work’s perfectly.

Can you tell me how I must change the stylesheet? I will use the function on a svg map (germany) to drag circles for the different cities. The container is display:fixed and I think that is the problem because the transform position is not exactly.

I show you a picture.