Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
  
  
  <!-- Latest Sortable -->
  <script src="https://raw.githack.com/SortableJS/Sortable/master/Sortable.js"></script>
  
  
  <div id="A" class="list-group">
    <div class="list-group-item">foo</div>
    <div class="list-group-item">bar</div>
    <div class="list-group-item">baz</div>
  </div>
  
  
  <div id="B" class="list-group">
    <div class="list-group-item">qux</div>
    <div class="list-group-item">quux</div>
  </div>
  
</body>
</html>
 
body {
  padding: 20px;
}
.list-group-item {
  cursor: move;
  cursor: -webkit-grabbing;
}
 
Sortable.create(A, {
  animation: 200,
  group: {
    name: "shared",
    pull: "clone",
    revertClone: true,
  },
  sort: true
});
Sortable.create(B, {
  group: "shared",
  sort: false
});
Output

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

Dismiss x
public
Bin info
owen-m1pro
0viewers