$(function() { $(function() { $("#sortable").sortable({ placeholder: "ui-sortable-placeholder", handle: "i" }); $('.add').click(function(){ var index=$('#sortable li').length+1; $('#sortable').append('
  • ×
  • ') $('.close').click(function(){ $(this).parents('li').remove(); }) }) }); });