日期:2014-05-16 浏览次数:20365 次
<style>
.inspect_list{
margin:3px auto 0;
float:left;
height:21px;
width:100%;
line-height:22px;
background:#E9E9E9;
overflow:hidden;
display:inline;
}
.not_move{
background:#ccbbdd;
cursor:auto;
}
$("#a,#b,#c").sortable({
connectWith: ".move_all",
items: "div:not(.not_move)",
opacity: 0.5,
helper: "clone",
receive: function(event, ui) {
alert($(this).html());
}
});
$("#a div,#b div,#c div").disableSelection();
$.ajax({
url:"./ajax_save.php",
type:"POST",
dataType:"html",
data:"action=knob_proving&valueOne=123",
async:false,
success: function(html){
html=html.split(",");
for (var i=0;i<html.length;i++ ) {
strs=arrRecord[i].split("_");
if(html[i]!=1){
var s=i+1;
$("#a").append("<div id='x_"+s+"' class='inspect_list'>"+strs[2]+"</div>");
}else{
$("#a").append("<div id='x_"+s+"' class='inspect_list not_move'>"+strs[2]+"</div>");
}
}
<div id="a" class="move_all" style="float:left;width:168px;height:261px;overflow:hidden;">
<div id="inspect1" class="not_move" style="margin:0 auto;height:21px;line-height:22px;background:#f0f0f0">数据1</div>
</div>
<div id="b" class="move_all" style="margin-left:5px;padding-left:5px;border:solid #aabbcc;border-width:0px 0px 0px 2px;height:261px;overflow:hidden;overflow:hidden">
<div id="inspect2" class="not_move" style="margin:0 auto;height:21px;line-height:22px;background:#f0f0f0">数据2</div>
</div>
<div id="c" class="move_all" style="float:left;width:168px;text-align:center;height:147px;overflow:hidden">
</div>