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

推荐订阅源

F
Fortinet All Blogs
S
Secure Thoughts
月光博客
月光博客
美团技术团队
雷峰网
雷峰网
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Forbes - Security
Forbes - Security
W
WeLiveSecurity
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
G
GRAHAM CLULEY
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
Last Week in AI
Last Week in AI
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
云风的 BLOG
云风的 BLOG
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recent Announcements
Recent Announcements
Webroot Blog
Webroot Blog
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
N
News and Events Feed by Topic
罗磊的独立博客
The Register - Security
The Register - Security
Blog — PlanetScale
Blog — PlanetScale
T
Threat Research - Cisco Blogs
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
B
Blog
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Engineering at Meta
Engineering at Meta
Latest news
Latest news
IT之家
IT之家
D
DataBreaches.Net
博客园 - 司徒正美
N
Netflix TechBlog - Medium
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

博客园 - 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;
}