jquery ui sortable 实现table,row的拖动。(Make Table Rows Sortable Using jQuery UI Sortable)
// Return a helper with preserved width of cells
var fixHelper = function(e, ui) {
//console.log(ui)
ui.children().each(function() {
$(this).width($(this).width()); //在拖动时,拖动行的cell(单元格)宽度会发生改变。在这里做了处理就没问题了
});
return ui;
};
jQuery(function(){
jQuery("#hrCalendar tbody").sortable({ //这里是talbe tbody,绑定 了sortable
helper: fixHelper, //调用fixHelper
axis:"y",
start:function(e, ui){
ui.helper.css({"background":"#fff"}) //拖动时的行,要用ui.helper
return ui;
},
stop:function(e, ui){
//ui.item.removeClass("ui-state-highlight"); //释放鼠标时,要用ui.item才是释放的行
return ui;
}
}).disableSelection();
})
jquery ui sortable 实现table,row的拖动。(Make Table Rows Sortable Using jQuery UI Sortable)的更多相关文章
- 14.9.2 Specifying the Row Format for a Table 指定 表的行格式
14.9.2 Specifying the Row Format for a Table 指定 表的行格式 mysql> SHOW TABLE STATUS\G; *************** ...
- jQuery通过ajax请求php遍历json数组到table中的代码
html代码(test.html),js在html底部 具体代码如下所示: <!DOCTYPE html> <html lang="en"> <hea ...
- MySQL.ERROR 1133 (42000): Can't find any matching row in the user table
ERROR 1133 (42000): Can't find any matching row in the user table 今天在执行 grant all privileges on cac ...
- SSMS查看表行数以及使用空间 How to show table row count and space used in SSMS - SSMS Tutorials
原文:How to show table row count and space used in SSMS - SSMS Tutorials There's a quick and convenien ...
- ERROR 1133 (42000): Can't find any matching row in the user table
环境:操作系统:Redhat 7.5 x86-64 数据库版本MySQL 5.7.25 现象:ERROR 1133 (42000): Can't find any matching row in th ...
- ios 报错 Invalid row height provided by table delegate. Value must be at least 0.0, or UITableViewAutomaticDi......
Invalid row height provided by table delegate. Value must be at least 0.0, or UITableViewAutomaticDi ...
- html table表格导出excel的方法 html5 table导出Excel HTML用JS导出Excel的五种方法 html中table导出Excel 前端开发 将table内容导出到excel HTML table导出到Excel中的解决办法 js实现table导出Excel,保留table样式
先上代码 <script type="text/javascript" language="javascript"> var idTmr; ...
- css Table布局:基于display:table的CSS布局
两种类型的表格布局 你有两种方式使用表格布局 -HTML Table(<table>标签)和CSS Table(display:table 等相关属性). HTML Table是指使用原生 ...
- 生成二维码 加密解密类 TABLE转换成实体、TABLE转换成实体集合(可转换成对象和值类型) COOKIE帮助类 数据类型转换 截取字符串 根据IP获取地点 生成随机字符 UNIX时间转换为DATETIME\DATETIME转换为UNIXTIME 是否包含中文 生成秘钥方式之一 计算某一年 某一周 的起始时间和结束时间
生成二维码 /// <summary>/// 生成二维码/// </summary>public static class QRcodeUtils{private static ...
随机推荐
- Python学习笔记——基础篇【第五周】——算法(4*4的2维数组和冒泡排序)、时间复杂度
目录 1.算法基础 2.冒泡排序 3.时间复杂度 (1)时间频度 (2)时间复杂度 4.指数时间 5.常数时间 6.对数时间 7.线性时间 1.算法基础 要求:生成一个4*4的2维数组并将其顺时针旋 ...
- [Q]无法卸载怎么办
正确卸载CAD批量打图精灵的方法是进入操作系统,“控制面版”,然后运行“添加和删除程序”,找到CAD批量打图精灵,选“更改/删除”,按照提示操作,即可进行卸载. 若使用强制卸载工具(如360等)卸载可 ...
- 初级AD域渗透系列
net group /domain 获得所有域用户组列表 net group “domain admins” /domain 获得域管理员列表 net group “enterprise admi ...
- TypeScript 学习一 参数,函数,析构表达式
1,TypeScript是由谷歌开发的,并且新出的Angular2框架就是谷歌公司由TypeScript语言编写的,所以现在TypeScript是有微软和谷歌一起支持的: 2,TypeScript在j ...
- 用 monitorix 开启linux图形化监控
# yum install monitorix # service monitorix starthttp://host:8080/monitorix/
- 推荐几个好的 Maven 常用仓库网址
注意,以下内容转载自:推荐几个好的 Maven 常用仓库网址 Maven 确确实实是个好东西,用来管理项目显得很方便,但是如果是通过 Maven 来远程下载 JAR 包的话,我宿舍的带宽是4兆的,4个 ...
- HDU 5572 An Easy Physics Problem (计算几何+对称点模板)
HDU 5572 An Easy Physics Problem (计算几何) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5572 Descripti ...
- 安装TensorFlow的步骤
安装步骤: 1.安装虚拟机: 2.安装liunx系统: 3.安装TensorFlow. 1.安装虚拟机:虚拟机的版本是不能太低的.我使用的是:VMware-workstation-full-12.0. ...
- 编写简单的爬虫从流行的Scrapy 框架讲起
到目前为止,我们已经完成了向站点添加搜索和过滤的功能,并且我们已经可以向站点添加一些分类和产品信息.下面我们将考虑当尝试删除实体信息时会发生什么事情. 首先,向站点添加一个名为Test的新分类,然后再 ...
- mac 配置快捷键快速锁屏
mac下锁屏方式有很多: 快捷键control+shift+power 在其他中打开钥匙串访问,讲屏幕锁定按钮显示在menu bar中 这两种方法存在弊端: 按三个键去锁定屏幕太费劲,况且让使用外接键 ...