Ihr hattet ja oben diesen code gepostet. Was muss ich da ändern, wenn ich möchte, dass das per drag & drop gezogene teil an der stelle, wo es hingezogen wurde gespeicht wird?
<html lang="de">
<head>
<meta charset="utf-8" />
<title></title>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<style>
.draggable { width: 100px; height: 100px; padding:5px; float: left; margin: 5px; background-color:#FE2E2E; display:inline-block; cursorointer;}
.droppable { width: 400px; height: 400px; padding:5px; float: left; margin: 10px; background:#2EFE2E; }
</style>
<script>
$(function() {
$('.draggable').draggable({
cursor: "pointer",
revert: "invalid",
opacity: 0.7,
snap: ".droppable",
snapMode: "inner"
});
$( ".droppable" ).droppable({
drop: function( event, ui ) {
$( this )
.find( "p" )
.html( "Dropped!" );
}
});
*
});
</script>
</head>
<body>
<div class="droppable">
<p>Drop here</p>
</div>
<div class="droppable">
<p>Drop here</p>
</div>
*
<div class="draggable">
<p>Drag me to my target</p>
</div>
<div class="draggable">
<p>Drag me to my target</p>
</div>
<div class="draggable">
<p>Drag me to my target</p>
</div>
<div class="draggable">
<p>Drag me to my target</p>
</div>
<div class="draggable">
<p>Drag me to my target</p>
</div>
*
</body>
</html>