java se拖动插件_jquery拖动插件(jquery.drag)使用介绍

jQuery Dynamic Drag'n Drop

body {

font-family: Arial, Helvetica, sans-serif;

font-size: 16px;

margin-top: 10px;

}

ul {

margin: 0;

}

#contentWrap {

width: 700px;

margin: 0 auto;

height: auto;

overflow: hidden;

}

#contentTop {

width: 600px;

padding: 10px;

margin-left: 30px;

}

#contentLeft {

float: left;

width: 400px;

}

#contentLeft li {

list-style: none;

margin: 0 0 4px 0;

padding: 10px;

background-color:#00CCCC;

border: #CCCCCC solid 1px;

color:#fff;

}

#contentRight {

float: right;

width: 260px;

padding:10px;

background-color:#336600;

color:#FFFFFF;

}

$(document).ready(function(){

$(function() {

$("#contentLeft ul").sortable({ opacity: 0.5, cursor: 'move', update: function() {

var id="";

$("ul.ui-sortable li").each(function(){

id+=$(this).attr("id")+"
";

})

$("#contentRight").html(id);

}

});

});

});

  • 3. Returned array can be found at the right
  • 2. Dragging changes the opacity of the item
  • 1. Once dropped, an Ajax query is activated
  • 4. It is very very easy
  • 5. It is very very easy
  • 6. It is very very easy
  • 7. It is very very easy

demo地址

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值