复制代码 代码如下:
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jQuery Dynamic Drag'n Drop</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.3.2.min.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-ui-1.7.1.custom.min.js"><style>
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;
}
</style>
<script type="text/javascript">
$(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")+"<br/>";
})
$("#contentRight").html(id);
}
});
});
});
</script>
</head>
<body style="cursor: auto;">
<div id="contentWrap">
<div id="contentLeft">
<ul class="ui-sortable">
<li id="recordsArray_3" style="opacity: 1; z-index: 0;" class="">3. Returned array can be found at the right</li>
<li id="recordsArray_2">2. Dragging changes the opacity of the item</li>
<li id="recordsArray_1" style="opacity: 1; z-index: 0;" class="">1. Once dropped, an Ajax query is activated</li>
<li id="recordsArray_4" style="opacity: 1; z-index: 0;" class="">4. It is very very easy</li>
<li id="recordsArray_5" style="opacity: 1; z-index: 0;" class="">5. It is very very easy</li>
<li id="recordsArray_6" style="opacity: 1; z-index: 0;" class="">6. It is very very easy</li>
<li id="recordsArray_7" style="opacity: 1; z-index: 0;" class="">7. It is very very easy</li>
</ul>
</div>
<div id="contentRight"></div>
</div>
</body></html>
demo地址
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jQuery Dynamic Drag'n Drop</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.3.2.min.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-ui-1.7.1.custom.min.js"><style>
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;
}
</style>
<script type="text/javascript">
$(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")+"<br/>";
})
$("#contentRight").html(id);
}
});
});
});
</script>
</head>
<body style="cursor: auto;">
<div id="contentWrap">
<div id="contentLeft">
<ul class="ui-sortable">
<li id="recordsArray_3" style="opacity: 1; z-index: 0;" class="">3. Returned array can be found at the right</li>
<li id="recordsArray_2">2. Dragging changes the opacity of the item</li>
<li id="recordsArray_1" style="opacity: 1; z-index: 0;" class="">1. Once dropped, an Ajax query is activated</li>
<li id="recordsArray_4" style="opacity: 1; z-index: 0;" class="">4. It is very very easy</li>
<li id="recordsArray_5" style="opacity: 1; z-index: 0;" class="">5. It is very very easy</li>
<li id="recordsArray_6" style="opacity: 1; z-index: 0;" class="">6. It is very very easy</li>
<li id="recordsArray_7" style="opacity: 1; z-index: 0;" class="">7. It is very very easy</li>
</ul>
</div>
<div id="contentRight"></div>
</div>
</body></html>
demo地址
标签:
jquery,拖动,drag
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“jquery拖动插件(jquery.drag)使用介绍”评论...
更新动态
2024年11月15日
2024年11月15日
- 张玮伽《微风细雨DSD》发烧大碟[WAV+CUE][1.1G]
- 群星《2024好听新歌14》十倍音质 U盘音乐 [WAV分轨][966M]
- s14全球总决赛T1战队队员都有谁 LOLs14全球总决赛T1战队介绍
- 英雄联盟faker身价有10亿吗 英雄联盟faker身价介绍一览
- faker大魔王称号怎么来的 faker大魔王称号来源介绍
- PS5 Pro上的蒂法更美了!博主盛赞新机1000%值得购买
- 腾讯互娱再离职一员大将!或因供应商贪腐
- Ayaneo3游戏掌机预热:旗舰定位、造型圆润自带底键
- 动力火车.1999-背叛情歌【上华】【WAV+CUE】
- 刘力扬.2019-Neon.Lit虹【摩登天空】【FLAC分轨】
- 群星.2002-恋爱物语情歌对唱精选2CD(引进版)【滚石】【WAV+CUE】
- 群星《闽南情24K德国HD金碟》2CD[WAV+CUE]
- 周传雄《恋人创世纪》环球唱片[WAV+CUE]
- 关淑怡-《真假情话K2HD》(日本压制)【WAV+CUE】
- 王菲 -《Faye Wong》雨果LPCD45 [WAV+分轨][1G]