我想添加对我创建的表的排序支持.
当使用item:TR时,我实现的占位符在IE 7中根本不起作用.它在FF中运行正常.
我已经尝试了代码<UL\>并且它正确执行.它似乎特定于表格和
我通过论坛进行了研究,似乎没有很多人使用表格排序:
<style type="text/css">
.dndPlaceHolder
{
background-color:Red ;
color:Red;
height: 20px;
line-height:30px;
border: solid 2px black;
}
.dndItem
{
background-color: #c0c0c0;
border:solid 1px black;
padding:5px;
}
</style>
<script type="text/javascript" >
$(function() {
$("#myTable").sortable(
{
placeholder:'dndPlaceHolder',
distance:15,
items:'tr',
forcePlaceholderSize:true,
change : dndChange,
update : dndUpdate
});
$("#myTable").disableSelection();
$("#myList").sortable(
{
placeholder:'dndPlaceHolder',
distance:15,
items:'li',
forcePlaceholderSize:true,
change : dndChange,
update : dndUpdate
});
$("#myList").disableSelection();
});
function dndChange(event,ui){
}
function dndUpdate(event,ui){
var msg = '';
}
</script>
<table id='myTable' > …Run Code Online (Sandbox Code Playgroud)