jquery,div层拖动,排序
来源:互联网 发布:中国足球 知乎 编辑:程序博客网 时间:2024/06/05 10:04
<head id="Head1" runat="server">
<title></title>
<script src="../js/jquery-1.6.min.js" type="text/javascript"></script>
<script src="js/ui.core.js" type="text/javascript"></script>
<script src="js/ui.sortable.js" type="text/javascript"></script>
<style type="text/css">
.style1
{
float:left;
}
.ui-icon ui-icon-arrowthick-2-n-s
{
background-color:Blue;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
$("#sortable").sortable({
stop: function () {
var newsort = $(this).sortable("toArray");
$.post("ajax.aspx", { sortid: newsort, "action": "OrderTodayBest" }, function (data) {
if (data != "ok") {
alert('出问题了,联系技术人员');
}
});
}
});
$("#ok").click(function () {
location.href = "ShowBest.aspx";
});
});
function RemoveToday() {
var arr = new Array();
$(".AllBest[@type=checkbox] :checked").each(function (i) {
arr[i] = $(this).val();
});
if (arr == "") {
dialog(arr, [
{ val: "", className: "x", title: "木有选择", text: ""}]);
}
else {
$.post("ajax.aspx", { arr: arr.toString(), "action": "RemoveOutToday" }, function (data) {
if (data == "ok") {
for (var j = 0; j < arr.length; j++) {
$("#" + arr[j]).remove();
$("#" + arr[j]).hide();
}
dialog(data, [
{ val: "ok", className: "v", title: "操作成功", text: ""}]);
}
else if (data == "fail") {
dialog(data, [
{ val: "fail", className: "x", title: "操作失败", text: ""}]);
}
});
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ul id="sortable" class="AllBest">
<li class="ui-state-default" id="1">
<span class="ui-icon ui-icon-arrowthick-2-n-s style1"></span>
<div class="style1" style="width: 100px; height:20px;">aaaaaaaaaaaaaaaaaa</div>
<div style="clear:both;"></div>
</li>
<li class="ui-state-default" id="2">
<span class="ui-icon ui-icon-arrowthick-2-n-s style1"></span>
<div class="style1" style="width: 100px; height:20px;">bbbbbbbbbbbbbbbbbbb</div>
<div style="clear:both;"></div>
</li>
<li class="ui-state-default" id="3">
<span class="ui-icon ui-icon-arrowthick-2-n-s style1"></span>
<div class="style1" style="width: 100px; height:20px;">cccccccccccccccccc</div>
<div style="clear:both;"></div>
</li>
<div style="clear:both;"></div>
</ul>
</div>
</form>
</body>
<title></title>
<script src="../js/jquery-1.6.min.js" type="text/javascript"></script>
<script src="js/ui.core.js" type="text/javascript"></script>
<script src="js/ui.sortable.js" type="text/javascript"></script>
<style type="text/css">
.style1
{
float:left;
}
.ui-icon ui-icon-arrowthick-2-n-s
{
background-color:Blue;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
$("#sortable").sortable({
stop: function () {
var newsort = $(this).sortable("toArray");
$.post("ajax.aspx", { sortid: newsort, "action": "OrderTodayBest" }, function (data) {
if (data != "ok") {
alert('出问题了,联系技术人员');
}
});
}
});
$("#ok").click(function () {
location.href = "ShowBest.aspx";
});
});
function RemoveToday() {
var arr = new Array();
$(".AllBest[@type=checkbox] :checked").each(function (i) {
arr[i] = $(this).val();
});
if (arr == "") {
dialog(arr, [
{ val: "", className: "x", title: "木有选择", text: ""}]);
}
else {
$.post("ajax.aspx", { arr: arr.toString(), "action": "RemoveOutToday" }, function (data) {
if (data == "ok") {
for (var j = 0; j < arr.length; j++) {
$("#" + arr[j]).remove();
$("#" + arr[j]).hide();
}
dialog(data, [
{ val: "ok", className: "v", title: "操作成功", text: ""}]);
}
else if (data == "fail") {
dialog(data, [
{ val: "fail", className: "x", title: "操作失败", text: ""}]);
}
});
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ul id="sortable" class="AllBest">
<li class="ui-state-default" id="1">
<span class="ui-icon ui-icon-arrowthick-2-n-s style1"></span>
<div class="style1" style="width: 100px; height:20px;">aaaaaaaaaaaaaaaaaa</div>
<div style="clear:both;"></div>
</li>
<li class="ui-state-default" id="2">
<span class="ui-icon ui-icon-arrowthick-2-n-s style1"></span>
<div class="style1" style="width: 100px; height:20px;">bbbbbbbbbbbbbbbbbbb</div>
<div style="clear:both;"></div>
</li>
<li class="ui-state-default" id="3">
<span class="ui-icon ui-icon-arrowthick-2-n-s style1"></span>
<div class="style1" style="width: 100px; height:20px;">cccccccccccccccccc</div>
<div style="clear:both;"></div>
</li>
<div style="clear:both;"></div>
</ul>
</div>
</form>
</body>
- jquery,div层拖动,排序
- jquery 可以拖动div层
- jQuery拖动div,移动div,弹出层
- div + css 拖动层
- DIV拖动层效果
- DIV 层拖动应用
- 层拖动Drag Div
- div拖动层
- 鼠标拖动div层
- 可拖动DIV层
- Jqurey拖动Div层
- jquery 的 thickbox 弹出可拖动的div层
- jQuery实现DIV层淡入淡出的拖动效果
- jquery 拖动图层
- JQUERY实现拖动层
- jquery-拖动层(五)
- jquery拖动DIV
- jquery 拖动DIV
- Linux文件权限
- 数据挖掘--挖掘频繁模式、关联和相关(2)
- 学习OpenCV——grabcut
- 【简介Introduction】 DisplayTag是一个开源的自定义标签库(Custom Tag lib),他提供了直接而有效的格式化web视图层数据的有效手段。你可以在现在流行的web应用的MV
- splunk索引数据动作
- jquery,div层拖动,排序
- 如何减小与“大牛”的差距
- spring3+struts2+JPA配置时出现 Unable to find file 警告,求解答。
- Oracle 9i 及PATCH官方下载地址
- 获取Android应用程序出错信息并将信息发送到指定邮件
- GridView翻页时保持CheckBox选择状态
- android环境搭建之旅-- (三)XP下用source insight查看代码和SSH,putty的安装
- Android 4.0中Launcher编译
- Chrome浏览器在用户访问一个不存在的网址时,会重新发起一个请求?