上下移动jquery
来源:互联网 发布:英文版软件 编辑:程序博客网 时间:2024/05/17 17:16
/*
* use:客服列表页面上下移动list
* creat:haoxj@xinfushe.com
* on:2016.6.12
*/
;(function($) {
var productsLabel = {
clc: function() {
var that = this;
$('.table tbody tr td').on('click', '.btn-up', function() {
var _this = this;
that.setUp(_this)
})
$('.table tbody tr td').on('click', '.btn-down', function() {
var _this = this;
that.setDown(_this)
})
},
//设置置顶
// setHot: function(t) {
// var bar = 'item-list';
// var obj = $(t).parents('.' + bar).clone(true);
// $(t).parents('.' + bar).remove();
// $(".tbody-list-box").prepend(obj);
// },
//设置上移
setUp: function(t) {
var bar = 'item-list';
if ($(t).parents('.' + bar).prev('.' + bar).html() != undefined) {
var obj = $(t).parents('.' + bar).clone(true);
$(t).parents('.' + bar).prev().before(obj);
$(t).parents('.' + bar).remove();
} else {
alert('亲,现在已是最上的哦,不能再上移了...');
}
},
//设置下移
setDown: function(t) {
var bar = 'item-list';
if ($(t).parents('.' + bar).next('.' + bar).html() != undefined) {
var obj = $(t).parents('.' + bar).clone(true);
$(t).parents('.' + bar).next().after(obj);
$(t).parents('.' + bar).remove();
} else {
alert('亲,现在已是最下的哦,不能再下移了...');
}
}
}
productsLabel.clc();
})($)
})
* use:客服列表页面上下移动list
* creat:haoxj@xinfushe.com
* on:2016.6.12
*/
;(function($) {
var productsLabel = {
clc: function() {
var that = this;
$('.table tbody tr td').on('click', '.btn-up', function() {
var _this = this;
that.setUp(_this)
})
$('.table tbody tr td').on('click', '.btn-down', function() {
var _this = this;
that.setDown(_this)
})
},
//设置置顶
// setHot: function(t) {
// var bar = 'item-list';
// var obj = $(t).parents('.' + bar).clone(true);
// $(t).parents('.' + bar).remove();
// $(".tbody-list-box").prepend(obj);
// },
//设置上移
setUp: function(t) {
var bar = 'item-list';
if ($(t).parents('.' + bar).prev('.' + bar).html() != undefined) {
var obj = $(t).parents('.' + bar).clone(true);
$(t).parents('.' + bar).prev().before(obj);
$(t).parents('.' + bar).remove();
} else {
alert('亲,现在已是最上的哦,不能再上移了...');
}
},
//设置下移
setDown: function(t) {
var bar = 'item-list';
if ($(t).parents('.' + bar).next('.' + bar).html() != undefined) {
var obj = $(t).parents('.' + bar).clone(true);
$(t).parents('.' + bar).next().after(obj);
$(t).parents('.' + bar).remove();
} else {
alert('亲,现在已是最下的哦,不能再下移了...');
}
}
}
productsLabel.clc();
})($)
})
0 0
- jquery上下移动<tr>
- Jquery Div上下移动
- 上下移动jquery
- jQuery操作SelectOption上下移动
- Jquery Div上下移动示例
- jquery实现左右上下移动
- jquery实现div上下移动
- jquery实现div上下移动
- Jquery可以上下移动行的表格
- JQuery特效,上下移动的选项卡
- 使用JQuery 对表格数据上下移动
- jquery 控制table tr 上下移动
- jquery操作表格上下移动行
- jquery实现tr元素的上下移动
- jquery实现表格内容的上下移动
- 用jQuery实现<select>选项上下移动
- 用jQuery实现<select>选项上下移动
- Jquery之实现上下移动和排序
- 不同版本PHP之间cURL的区别
- html初学日记
- 计算机图形学(二)输出图元_20_章节总结_程序展示_折线图和直方图
- poj 2723
- 关于Android线性布局中weight属性的一个小发现
- 上下移动jquery
- Android Fragment实例
- part1: maven 工程整合spring+activemq
- Android 编程下 Touch 事件的分发和消费机制
- RequireJS入门(二)
- Spark源码学习(3)——Job Runtime
- 集群(cluster)和高可用性(HA)的概念
- Volley使用详解
- Eclipse提示内存不足