Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <ul class="sort"></ul>
  <button id="add">Add</button>
</body>
</html>
 
$('.sort').sortable({
  update:function(){
    console.log('update');
  }
});
$('#add').click(function(){
  var date = new Date();
 $('.sort').append('<li>Text</li>');
  $('.sort').trigger('sortupdate');
  $('.sort').sortable( "refreshPositions" );
});
Output

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

Dismiss x
public
Bin info
MBehtemampro
0viewers