vendor: 2,157 bytes, lines 1-77
1;(function ($, window, document, undefined) { 2 'use strict'; 3 4 Foundation.libs.equalizer = { 5 name : 'equalizer', 6 7 version : '5.5.1', 8 9 settings : { 10 use_tallest : true, 11 before_height_change : $.noop, 12 after_height_change : $.noop, 13 equalize_on_stack : false 14 }, 15 16 init : function (scope, method, options) { 17 Foundation.inherit(this, 'image_loaded'); 18 this.bindings(method, options); 19 this.reflow(); 20 }, 21 22 events : function () { 23 this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function (e) { 24 this.reflow(); 25 }.bind(this)); 26 }, 27 28 equalize : function (equalizer) { 29 var isStacked = false, 30 vals = equalizer.find('[' + this.attr_name() + '-watch]:visible'), 31 settings = equalizer.data(this.attr_name(true) + '-init'); 32 33 if (vals.length === 0) { 34 return; 35 } 36 var firstTopOffset = vals.first().offset().top; 37 settings.before_height_change(); 38 equalizer.trigger('before-height-change').trigger('before-height-change.fndth.equalizer'); 39 vals.height('inherit'); 40 vals.each(function () { 41 var el = $(this); 42 if (el.offset().top !== firstTopOffset) { 43 isStacked = true; 44 } 45 }); 46 47 if (settings.equalize_on_stack === false) { 48 if (isStacked) { 49 return; 50 } 51 }; 52 53 var heights = vals.map(function () { return $(this).outerHeight(false) }).get(); 54 55 if (settings.use_tallest) { 56 var max = Math.max.apply(null, heights); 57 vals.css('height', max); 58 } else { 59 var min = Math.min.apply(null, heights); 60 vals.css('height', min); 61 } 62 settings.after_height_change(); 63 equalizer.trigger('after-height-change').trigger('after-height-change.fndtn.equalizer'); 64 }, 65 66 reflow : function () { 67 var self = this; 68 69 this.S('[' + this.attr_name() + ']', this.scope).each(function () { 70 var $eq_target = $(this); 71 self.image_loaded(self.S('img', this), function () { 72 self.equalize($eq_target) 73 }); 74 }); 75 } 76 }; 77})(jQuery, window, 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.