jQuery拖动调整表格列宽度-resizableColumns
2015-04-14 14:39
489 查看
实现鼠标可拖动调整表格列宽度 如图:
一、引入文件:
[html]
view plaincopy
<script src="/js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/js/store.js" type="text/javascript"></script>
<script src="/js/jquery.resizableColumns.js" type="text/javascript"></script>
二、TABLE
[html]
view plaincopy
<table id="myTable" border="1">
<thead>
<tr>
<th data-resizable-column-id="a"><input type="checkbox" /></th>
<th data-resizable-column-id="b">栏目类型 </th>
<th data-resizable-column-id="c">活动名称 </th>
<th data-resizable-column-id="d">状态 </th>
<th data-resizable-column-id="e">操作选项</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>青春日记</td>
<td>2014年度青春日记征文 </td>
<td>提交 </td>
<td>审核</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>我和孩子的成长故事</td>
<td>成长故事 </td>
<td>通过 </td>
<td>审核</td>
</tr>
</tbody>
</table>
以上html只是作为Demo 并不是我项目中所实际使用的,并且在测试的时候 也未能实现。郁闷...
三、实现表格可拖动
[javascript]
view plaincopy
<script type="text/javascript">
$(function(){
$("#myTable").resizableColumns({
store: window.store
});
})
</script>
在项目使用过程中 发现无需引入store.js <th>也无需data-resizable-column-id属性
并且$("#myTable").resizableColumns();也可实现功能
所需文件下载地址:http://download.csdn.net/detail/itmyhome/7390263
分别解压两个文件
jquery.resizableColumns.js在\jquery-resizable-columns-gh-pages\dist路径下
store.js在store.js-master路径下
一、引入文件:
[html]
view plaincopy
<script src="/js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/js/store.js" type="text/javascript"></script>
<script src="/js/jquery.resizableColumns.js" type="text/javascript"></script>
二、TABLE
[html]
view plaincopy
<table id="myTable" border="1">
<thead>
<tr>
<th data-resizable-column-id="a"><input type="checkbox" /></th>
<th data-resizable-column-id="b">栏目类型 </th>
<th data-resizable-column-id="c">活动名称 </th>
<th data-resizable-column-id="d">状态 </th>
<th data-resizable-column-id="e">操作选项</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>青春日记</td>
<td>2014年度青春日记征文 </td>
<td>提交 </td>
<td>审核</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>我和孩子的成长故事</td>
<td>成长故事 </td>
<td>通过 </td>
<td>审核</td>
</tr>
</tbody>
</table>
以上html只是作为Demo 并不是我项目中所实际使用的,并且在测试的时候 也未能实现。郁闷...
三、实现表格可拖动
[javascript]
view plaincopy
<script type="text/javascript">
$(function(){
$("#myTable").resizableColumns({
store: window.store
});
})
</script>
在项目使用过程中 发现无需引入store.js <th>也无需data-resizable-column-id属性
并且$("#myTable").resizableColumns();也可实现功能
所需文件下载地址:http://download.csdn.net/detail/itmyhome/7390263
分别解压两个文件
jquery.resizableColumns.js在\jquery-resizable-columns-gh-pages\dist路径下
store.js在store.js-master路径下
相关文章推荐
- jQuery拖动调整表格列宽度-resizableColumns
- jQuery拖动调整表格列宽度-resizableColumns
- jQuery拖动调整表格列宽度-resizableColumns
- jQuery拖动调整表格列宽度-resizableColumns
- jQuery拖动调整表格列宽度-resizableColumns
- jquery可拖动表格调整列格子的宽度大小
- jquery可拖动表格调整列格子的宽度大小(转)
- jquery可拖动表格调整列格子的宽度大小 本文章来源于 代潇瑞博客 原文地址:http://www.daixiaorui.com/read/98.html
- jQuery判断浏览器并动态调整select宽度的方法
- Jquery colResizable 插件 可拖动表格的宽度
- jQuery判断浏览器并动态调整select宽度的方法
- jquery入门 动态调整div大小,使其宽度始终为浏览器宽度
- jQuery获取元素位置以及高度与宽度 动态调整打开新窗口效果
- jquery动态调整div大小使其宽度始终为浏览器宽度
- JQuery 表格拖动调整列宽效果
- jQuery实现鼠标可拖动调整表格列宽度
- kindeditor在bootstap模态框modal中点击全屏空白无效,高度宽度拖动调整
- jquery动态调整div大小使其宽度始终为浏览器宽度
- jquery动态调整表格宽度
- JQuery 表格拖动调整列宽效果