javascript - drag and drop div onto div -


i not sure how ask question, i'll try best.

i coding website, , have list of div's generated php. there div on side. idea is, when drag 1 of divs in list onto other div, class of div in list.

the html code 1 of divs in list:

<div style='width:100px' class='div1' draggable='true'> [content] </div> 

the html code div drop into:

<div class="dropzone" ondrop="drop(event)" ondragover="allowdrop(event)" style="padding: 10px; border-width: 2px; border-style: dashed; width: 100px; height: 210px; float: right;"> [content] </div> 

the idea is, when drag "div1" "dropzone", dropzone run javascript function "div1" variable. there way in javascript?

thanks!

you can idea site :

http://www.html5rocks.com/en/tutorials/dnd/basics/

http://www.w3schools.com/html/html5_draganddrop.asp


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -