1/* global window, module, define, jQuery, require */ 2/* 3 * Bootstrap ColEqualizer v1.0.0 4 * https://github.com/gsmke/bootstrap-colequalizer 5 */ 6 7;(function(factory) { 8 'use strict'; 9 10 if (typeof define === 'function' && define.amd) { 11 define(['jquery'], factory); 12 } else if (typeof exports !== 'undefined') { 13 module.exports = factory(require('jquery')); 14 } else { 15 factory(jQuery); 16 } 17 18}(function($) { 19 'use strict'; 20 21 var ColEqualizer = window.ColEqualizer || {}; 22 23 ColEqualizer = (function () { 24 25 function ColEqualizer(element) { 26 27 var _ = this; 28 29 _.el = element; 30 31 _.colHeight(_.el); 32 33 _.winLoad(); 34 35 } 36 37 return ColEqualizer; 38 39 }()); 40 41 ColEqualizer.prototype.colHeight = function(element) { 42 43 var _ = this; 44 45 $(element).each(function (index,el) { 46 _.colReset(el); 47 var tallest = 0; 48 $('[class*=col-]',el).each(function (i,e) { 49 var testHeight = $(e).height(); 50 if (testHeight > tallest) { 51 tallest = testHeight; 52 } 53 }); 54 $('[class*=col-]',el).height(tallest); 55 }); 56 57 }; 58 59 ColEqualizer.prototype.colReset = function(el) { 60 61 $('[class*=col-]',el).height('auto'); 62 63 }; 64 65 ColEqualizer.prototype.resizeWindow = function() { 66 67 var _ = this; 68 var viewWidth = window.outerWidth; 69 70 // If set, minWidth shows/hides the nav based on the size of the browser 71 // If minWidth not set, nav will always show 72 if (768 <= viewWidth) { 73 _.colHeight(_.el); 74 } else { 75 _.colReset(_.el); 76 } 77 78 }; 79 80 ColEqualizer.prototype.winLoad = function() { 81 82 var _ = this; 83 var $win = $(window); 84 85 $win.load(function () { 86 // Run function on window resize 87 $win.on('resize', function () { 88 _.resizeWindow(); 89 }); 90 // Run function the first time 91 _.resizeWindow(); 92 }); 93 94 }; 95 96 // jQuery Plugin 97 $.fn.colequalizer = function () { 98 99 var _ = this; 100 101 return _.each(function (index, element) { 102 element.navinator = new ColEqualizer(element); 103 }); 104 105 }; 106}));
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.