sortable.js 华丽丽的排序
首先导入这几个资源
<link href="/css/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
页面加载时执行
$("#sortable").sortable({ opacity:0.8, revert:true, forceHelperSize:true, placeholder: 'draggable-placeholder', forcePlaceholderSize:true, tolerance:'pointer', stop: function( event, ui ) { //just for Chrome!!!! so that dropdowns on items don't appear below other items after being moved $(ui.item).css('z-index', 'auto'); $.post( "/scheme/sortPointMenu", { keyList :$("#sortable").sortable('serialize'), stageId:lvId }, function(response){ } ); } });