1(function(e, t, n, r) { 2 function o(t, n) { 3 this.elements = t; 4 this.options = e.extend({}, s, n); 5 this._defaults = s; 6 this._name = i; 7 this.active = false; 8 this.timer = null; 9 this.init() 10 } 11 var i = "equalHeight", 12 s = { 13 wait: false, 14 responsive: true, 15 resizeInterval: 100, 16 onStart: r, 17 onResize: r, 18 onStop: r 19 }; 20 o.prototype = { 21 init: function() { 22 if (!this.options.wait) { 23 this.start() 24 } 25 if (this.options.responsive) { 26 e(t).on("resize", e.proxy(this.resize, this)) 27 } 28 }, 29 magic: function() { 30 var t = 0; 31 this.reset(); 32 for (var n = 0; n < this.elements.length; n++) { 33 var r = e(this.elements[n]).height(); 34 t = r > t ? r : t 35 } 36 if (!this.active) return; 37 for (var i = 0; i < this.elements.length; i++) { 38 var s = e(this.elements[i]); 39 if (s.css("display") === "table-cell") { 40 s.css("height", t) 41 } else { 42 s.css("min-height", t) 43 } 44 } 45 if (!this.active) this.reset() 46 }, 47 reset: function() { 48 this.elements.css("min-height", ""); 49 this.elements.css("height", "") 50 }, 51 start: function() { 52 this.active = true; 53 if (e.isFunction(this.options.onStart)) { 54 if (this.options.onStart.call(this)) { 55 this.magic() 56 } 57 } else { 58 this.magic() 59 } 60 }, 61 stop: function() { 62 this.active = false; 63 this.reset() 64 }, 65 onWindowResize: function() { 66 this.reset(); 67 if (this.active) { 68 if (e.isFunction(this.options.onResize)) { 69 if (this.options.onResize.call(this)) { 70 this.magic() 71 } 72 } else { 73 this.magic() 74 } 75 } 76 }, 77 resize: function() { 78 if (this.timer) { 79 clearTimeout(this.timer) 80 } 81 var t = this; 82 this.timer = setTimeout(function() { 83 e.proxy(t.onWindowResize, t) 84 }, t.options.resizeInterval) 85 } 86 }; 87 e.fn[i] = function(e) { 88 return new o(this, e) 89 } 90})(jQuery, window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.