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="//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>
  
  <button id="switcher">disable</button>
  <br/>  <br/>
  
  <ul id="list" class="list-group">
    <li class="list-group-item">This is <a href="http://rubaxa.github.io/Sortable/">Sortable</a></li>
    <li class="list-group-item">It works with Bootstrap...</li>
    <li class="list-group-item">...out of the box.</li>
    <li class="list-group-item">It has support for touch devices.</li>
    <li class="list-group-item">Just drag some elements around.</li>
  </ul>
  
</body>
</html>
 
body {
  padding: 20px;
}
.list-group-item {
  cursor: move;
  cursor: -webkit-grabbing;
}
 
var sortable = Sortable.create(list);
switcher.onclick = function () {
    var state = sortable.option("disabled"); // get
    sortable.option("disabled", !state); // set
  
    switcher.innerHTML = state ? 'disable' : 'enable';
};
Output

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

Dismiss x
public
Bin info
owen-m1pro
0viewers