PageSourceSearch

https://missdream.org/wp-content/themes/miss-dream/foundation/js/foundation/foundation.equalizer.js

js missdream.org collected 2026-09-24 20:41:17 UTC 1,829 bytes, 67 lines download raw bytes

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