briangonzalez / jquery.pep.js

👟 Pep, a lightweight plugin for kinetic drag on mobile/desktop
http://pep.briangonzalez.org
1.3k stars 178 forks source link

Drag icon but clone a corresponding HTML element #174

Closed patagoniahiker closed 7 years ago

patagoniahiker commented 8 years ago

Hi, I am trying to achieve a drag and drop function with lazy loading, using an icon that represents a graph (HTML fragment).

In the page, on the left is a small set of icons, and on the right is the main div for content; rather widget-content.

A user needs to drag the icon-graph (icon of a graph) from a small menu panel on the surface on the main div, and then on drop I need to retrieve an HTML fragment from the server of the actual graph/sparkline and put/paste/append that to the main DIV as the panel.

Can you help me understand 1 how to configure it 2 the JS to retrieve the HTML and append into the dopped DIV holder