Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="sortable">
    <div class="draggable"> test 1 </div>
    <div class="draggable"> test 2 </div>
    <div class="draggable"> test 3 </div>
    <div class="draggable"> test 4 </div>
    <div class="draggable"> test 5 </div>
    <div class="draggable"> test 6 </div>
  </div>
  
  
</body>
</html>
 
$('.draggable').draggable({
  connectToSortable: '.sortable',
  drop: function(){
    console.log('Element dropped');
  }
});
$('.sortable').sortable({
  update: function(){
     console.log('sortable updated'); 
  }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers