Skip to content

Instantly share code, notes, and snippets.

@msroot
Created May 18, 2012 21:41
Show Gist options
  • Select an option

  • Save msroot/2727755 to your computer and use it in GitHub Desktop.

Select an option

Save msroot/2727755 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$(".box").draggable({
revert: true
});
$(".box").droppable({
activeClass: "drop-active",
drop: function(event, ui) {
var to = $(this).attr("id").replace("collection_","");
var from = ui.draggable.attr("id").replace("collection_","");
//console.log(from + to);
window.location = host+"merge/"+from+"/with/"+to;
}
});
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment