<!DOCTYPE html>
<html lang="en">
<head>
<title>colResizable demo</title>
<link rel="stylesheet" type="text/css" href="postback.Demo/css/main.css" />
<style>
.scroll{
overflow-x:scroll;
max-width:100%;
position:relative;
}
</style>
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="colResizable-1.6.js"></script>
<script type="text/javascript">
$(function(){
var innerHTML = $("#updatePanel").html();
var onTablesCreated = function(){
$("#normal").colResizable({
liveDrag:true,
gripInnerHtml:"<div class='grip'></div>",
draggingClass:"dragging",
resizeMode:'fit',
postbackSafe:true,
partialRefresh:true});
$("#flex").colResizable({
liveDrag:true,
gripInnerHtml:"<div class='grip'></div>",
draggingClass:"dragging",
resizeMode:'flex',
postbackSafe:true,
partialRefresh:true});
$("#overflow").colResizable({
liveDrag:true,
gripInnerHtml:"<div class='grip'></div>",
draggingClass:"dragging",
resizeMode:'overflow',
postbackSafe:true,
partialRefresh:true});
}
var fakePostback = function(){
$("#updatePanel").html('<img src="img/loading.gif"/>');
setTimeout(function(){
$("#updatePanel").html(innerHTML);
onPostbackOver();
}, 700);
};
var onPostbackOver = function(){
onTablesCreated();
};
$("#postback").click(fakePostback);
onPostbackOver();
});
</script>
</head>
<body>
<div class="center" >
<h3>Click on 'Partial refresh' to simulate a postback</h3>
<button id="postback">Partial refresh</button >
<div id="updatePanel">
<br/>
<p><strong>resizeMode: 'fit'</strong> table width adapts to the container width. Columns resize using their neighbour's width</p>
<table id="normal" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th>header</th><th>header</th><th>header</th>
</tr>
<tr>
<td class="left">cell</td><td>cell</td><td class="right">cell</td>
</tr>
<tr>
<td class="left">cell</td><td>cell</td><td class="right">cell</td>
</tr>
<tr>
<td class="left bottom">cell</td><td class="bottom">cell</td><td class="bottom right">cell</td>
</tr>
</table>
<p><strong>resizeMode: 'flex'</strong> columns are sized independently unless there is not enought space in the container</p>
<table id="flex" width="50%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th>header</th><th>header</th><th>header</th>
</tr>
<tr>
<td class="left">cell</td><td>cell</td><td class="right">cell</td>
</tr>
<tr>
<td class="left">cell</td><td>cell</td><td class="right">cell</td>
</tr>
<tr>
<td class="left bottom">cell</td><td class="bottom">cell</td><td class="bottom right">cell</td>
</tr>
</table>
<p><strong>resizeMode: 'overflow'</strong> columns are sized independently. Table width can exceed its container </p>
<div class="scroll">
<table id="overflow" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th>header</th><th>header</th><th>header</th>
</tr>
<tr>
<td class="left">cell</td><td>cell</td><td class="right">cell</td>
</tr>
<tr>
<td class="left">cell</td><td>cell</td><td class="right">cell</td>
</tr>
<tr>
<td class="left bottom">cell</td><td class="bottom">cell</td><td class="bottom right">cell</td>
</tr>
</table>
</div>
<br/>
</div>
<br/>
<br/><br/>
</div>
</body>
</html>
jquery插件colResizable实现表格列可拖拽伸缩表格大小
需积分: 0 196 浏览量
2023-03-14
14:49:44
上传
评论
收藏 141KB ZIP 举报
熟悉的新风景
- 粉丝: 1694
- 资源: 29
最新资源
- SSCMS登录模块需要的JS文件
- JSP网络购物中心毕业设计(源代码+论文).rar
- 白盒测试报告.docx
- 基于LM5117芯片评估开发板硬件参考设计(原理图+PCB)+中英文数据手册资料.zip
- 照片批量重命名软件(文件批量修改图片文件名)
- app.apk
- 人工智能(AI)是计算机科学的一个分支,旨在开发和应用能够模拟、延伸和扩展人类智能的理论、方法和技术,包括机器人、语言识别、图像
- 嵌入式与物联网开发是当今信息技术领域的两大重要分支,它们相互交织,共同推动着智能化时代的进步 嵌入式开发主要关注在嵌入式操作
- 网络安全,这一看似高深莫测的领域,实则与我们每个人的生活息息相关
- 毕业设计基于深度学习的视觉问答系统源码+文档说明+答辩PPT.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈