JuqeryResize
//添加
(function ($, h, c) { var a = $([]), e = $.resize = $.extend($.resize, {}), i, k = "setTimeout", j = "resize", d = j + "-special-event", b = "delay", f = "throttleWindow"; e[b] = 250; e[f] = true; $.event.special[j] = { setup: function () { if (!e[f] && this[k]) { return false } var l = $(this); a = a.add(l); $.data(this, d, { w: l.width(), h: l.height() }); if (a.length === 1) { g() } }, teardown: function () { if (!e[f] && this[k]) { return false } var l = $(this); a = a.not(l); l.removeData(d); if (!a.length) { clearTimeout(i) } }, add: function (l) { if (!e[f] && this[k]) { return false } var n; function m(s, o, p) { var q = $(this), r = $.data(this, d); r.w = o !== c ? o : q.width(); r.h = p !== c ? p : q.height(); n.apply(this, arguments) } if ($.isFunction(l)) { n = l; return m } else { n = l.handler; l.handler = m } } }; function g() { i = h[k](function () { a.each(function () { var n = $(this), m = n.width(), l = n.height(), o = $.data(this, d); if (m !== o.w || l !== o.h) { n.trigger(j, [o.w = m, o.h = l]) } }); g() }, e[b]) } })(jQuery, this);
//调用
$('#center-pane').resize(function () {
});
最新文章
- Git同步原始仓库到Fork仓库中
- 关于vue指令(directive)
- javap反编译解释外部类直接使用内部类private字段的原理
- 在Mac OSX 10.10 上安装opencv
- 注意!你的Thread.Abort方法真的让线程停止了吗?
- 1303: [CQOI2009]中位数图
- MinGW-64 安装
- 游戏基础元素——Cocos2d-x学习历程(八)
- jbpmAPI-5
- 使用链表实现队列------《数据结构与算法分析-C语言描述》
- android布局margin和padding差异!
- overflow:hidden
- 【性能测试工具】- ApacheBench
- 201521123081《Java程序设计》 第10周学习总结
- [转帖]Ansible 入门秘诀
- 看到一个想收藏的的AJAX小列子
- Divide by three, multiply by two CodeForces - 977D (思维排序)
- 【学亮IT手记】利用字节流复制图片
- codeforces732C
- v4l2文档之——color and format【转】