javascript - Drag and drop function matching images -


i made dropspot drag , drop function in div has image + dropspot unfortunately function doesnt work :( wrong ?

http://jsfiddle.net/6tsfh/

$(function() {     $( ".right img" ).draggable     ({      revert: "invalid",     helper: 'clone'      });     $( "#dropspot0" ).droppable({        tolerance: 'fit',        drop: function( event, ui ) {          $(ui.draggable).clone().appendto($("#dropspot0"));       }     });   }); 

check jsfiddle

i think jqueryui library not included in jsfiddle.

$(function() {   $( ".right img" ).draggable   ({    revert: "invalid",   helper: 'clone'    });   $( "#dropspot0" ).droppable({      tolerance: 'intersect',       drop: function( event, ui ) {      $(ui.draggable).clone().appendto($("#dropspot0"));   }   }); }); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -