Jump to content
Search Community

sweplatte

Members
  • Posts

    1
  • Joined

  • Last visited

sweplatte's Achievements

0

Reputation

  1. I need to have my element draggable but I also need to find out where a user clicks on it. Problem with this code is that it disables the drag. Any ideas how i can get the element draggable and in the same time in someway find out where a user clicked on the element? My code which fires and outputs the position of the click to the console but it disables draggable: Draggable.create("#"+dynamicdividname); var myDiv = document.getElementById(dynamicdividname); myDiv.onclick=function() { var xx = event.clientX; var yy = event.clientY; console.log("X:"+xx+" Y:"+yy); }; Thanks for any answers in advance..!!
×
×
  • Create New...