0

I have placed a moveable DIV over web page. I want to get data like text or image or HTML behind that div. Once I move it to a place on webpage and then press button. It should get that data behind that div and save in JavaScript variable.

I have attached image of what I have done so far. I need your suggestion how I can accomplish this task.

Screenshot of div over webpage:

screenshot of div over webpage

I used, interactJS library to create drag-able div.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

1

You can use jQuery and its .next() method, for example: nextItemText = $("#your-div-id").next().text();

SergeyLebedev
  • 3,673
  • 15
  • 29