惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
Cloudbric
Cloudbric
The Register - Security
The Register - Security
小众软件
小众软件
PCI Perspectives
PCI Perspectives
G
Google Developers Blog
AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
TaoSecurity Blog
TaoSecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
F
Full Disclosure
N
Netflix TechBlog - Medium
博客园_首页
Last Week in AI
Last Week in AI
A
Arctic Wolf
B
Blog RSS Feed
J
Java Code Geeks
C
Cybersecurity and Infrastructure Security Agency CISA
I
InfoQ
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
有赞技术团队
有赞技术团队
S
Schneier on Security
L
Lohrmann on Cybersecurity
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Security Latest
Security Latest
Vercel News
Vercel News
博客园 - 司徒正美
Webroot Blog
Webroot Blog
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans

博客园 - herobeast

hadoop 2.7.1 高可用安装部署 Redis篇 MySql篇 Tomcat篇 JDK篇 web一次下载多个附件 Implementing a Custom Security Manager(翻译) 腾达路由器设置 正则表达式 OSGi规范 OSGi bundle 与 fragment OSGi bundle之间互相通信的方法 Apache CXF 分布式OSGi部署HelloWorld 五米测试 Spring.DM web 开发环境搭建 Spring.DM版HelloWorld 腾讯资深产品经理谈敏捷开发于游戏 js矢量图类库:Raphaël—JavaScript Library 关于生成id的问题
jQuery Resizable笔记
herobeast · 2012-05-09 · via 博客园 - herobeast
JQ UI集中有个对窗口大小调整的控件:Resizable,可以按照一定条件拖拉调整窗口尺寸。包括限制最大/最小尺寸,等比调整,栅格调整,同比窗口。现在来看看如何对其进行调用:

JQ 的UI包里面的示例中有个叫splitpane的实例,演示的就是如何使用这个UI。

$('div ').resizable({
    alsoResize: false, //2个窗口同比缩放,例如: ‘#id’
    animate: false, //设置动画效果
    animateDuration: “slow”, //动画频率
    animateEasing: “swing”,
    aspectRatio: false,  //设置缩放比例,本窗口比例
    autoHide: false,
    cancel: “:input,option”,
    containment: false, //以父系元素高宽为缩放范围,这个尺寸为父系元素宽(高)-margin值
    delay: 0,  //延时缩放效果 移动多少毫秒后开始缩放  单位毫秒
    distance: 1, //延时缩放效果,移动多少px开始缩放  单位px
    ghost: false,  //复制显示缩放效果
    grid: false, //栅格缩放,单位px
    handles: “e,s,se”,//横向拖动,或竖向拖动
    helper: false, 
    maxHeight: null, //最大高度
    maxWidth: null, //最大宽度
    minHeight: 10, //最小高度
    minWidth: 10, //最小宽度
     zIndex: 1000
});

可以从中看到JQ的Resizable这个UI可配置的参数还是很多的,可以根据实际需求进行调整,但并非所有的参数都是必须的。
值得说明的是:在CSS里面有二个样式比较重要,缺少这二个IE6下就无法移动。

.ui-resizable-e {
    width: 10px; height: 475px;
    background:#e1e7f2 url(../images/splitpane_handle-ew.gif) no-repeat scroll 75% 50% !important;
    cursor:col-resize !important;
    border-left: #bbb 1px solid;
    padding: 3px;
}
.ui-resizable-n {
    height: 10px;
    background:#e1e7f2 url(../images/splitpane_handle-sn.gif) no-repeat scroll 50% 55% !important;
    border-top: #bbb 1px solid;
    padding: 3px;
}