Come trascinare un div con jquery e il metodo draggable() Richiamo le librerie jquery.
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
Funzione javascript
<script>
$(document).ready(function(){
$('.drag').draggable();
});
</script>
Codice html
<div class='drag'></div>
Codice css
<style>
.drag {
background-color:red;
width:100px;
height:100px;
}
</style>