1;(function ($, window, document, undefined) { 2 'use strict'; 3 4 Foundation.libs.equalizer = { 5 name : 'equalizer', 6 7 version : '5.4.6', 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) return; 34 var firstTopOffset = vals.first().offset().top; 35 settings.before_height_change(); 36 equalizer.trigger('before-height-change').trigger('before-height-change.fndth.equalizer'); 37 vals.height('inherit'); 38 vals.each(function(){ 39 var el = $(this); 40 if (el.offset().top !== firstTopOffset) { 41 isStacked = true; 42 } 43 }); 44 45 if (settings.equalize_on_stack === false) { 46 if (isStacked) return; 47 }; 48 49 var heights = vals.map(function(){ return $(this).outerHeight(false) }).get(); 50 51 if (settings.use_tallest) { 52 var max = Math.max.apply(null, heights); 53 vals.css('height', max); 54 } else { 55 var min = Math.min.apply(null, heights); 56 vals.css('height', min); 57 } 58 settings.after_height_change(); 59 equalizer.trigger('after-height-change').trigger('after-height-change.fndtn.equalizer'); 60 }, 61 62 reflow : function () { 63 var self = this; 64 65 this.S('[' + this.attr_name() + ']', this.scope).each(function(){ 66 var $eq_target = $(this); 67 self.image_loaded(self.S('img', this), function(){ 68 self.equalize($eq_target) 69 }); 70 }); 71 } 72 }; 73})(jQuery, window, window.document); 74
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.