多单位版国产化地质资料管理系统
zhai
2025-12-13 fc0cc9fff4b4cbdc7cbb52b4a96c947530fcbba0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*!
 * jQuery afterresize event plugin
 * http://github.com/roxeteer/jquery-afterresize
 *
 * Copyright (c) 2010 Visa Kopu, visa@visakopu.net
 *
 * Licensed under the BSD license.
 * http://github.com/roxeteer/jquery-afterresize/wiki/License
 */
 
(function($) {
    var resizeHandler = function(e) {
        var el = $(this);
 
        if (el.data("resizetimer")) {
            window.clearTimeout(el.data("resizetimer"));
        }
 
        el.data("resizetimer", window.setTimeout(function() {
            el.trigger("afterresize");
        }, 300));
    }
 
    $.event.special.afterresize = {
        add: function(handleObj) {
            $(this).bind("resize", resizeHandler);
 
            // apply old event handler
            var old_handler = handleObj.handler;
            handleObj.handler = function(event) {
                return old_handler.apply(this, arguments);
            }
        },
 
        remove: function(handleObj) {
            $(this).unbind("resize", resizeHandler);
        }
    };
 
    $.fn.extend({
        afterresize: function(f) {
            if ($.isFunction(f)) {
                $(this).bind("afterresize", f);
            } else {
                $(this).trigger("afterresize");
            }
 
            return this;
        }
    });
})(jQuery);