1(function ( $ ) { 2 3 $.fn.evenColumns = function() { 4 5 var object = this; 6 var argumentsPassed = arguments; 7 8 function setHeight(options) { 9 10 for (var j = 0; j < options.length; j++) { 11 12 var settings = $.extend({ 13 maxScreenWidth: 9999, 14 columns: 0 15 }, options[j] ); 16 17 minWidth = options[j + 1] ? options[j + 1].maxScreenWidth + 1 : 0; 18 19 if ($('html').width() >= minWidth && $('html').width() <= settings.maxScreenWidth) { 20 21 object.css('height', ''); 22 23 if (settings.columns != 1) { 24 var height = 0; 25 var group = []; 26 var full = 0; 27 28 object.each(function(index) { 29 full = 0; 30 31 if ($(this).outerHeight() > height) { 32 height = $(this).outerHeight(); 33 } 34 35 if (settings.columns) { 36 37 group.push($(this)); 38 39 if (!((index + 1)%settings.columns)) { 40 41 for (var i = group.length - 1; i >= 0; i--) { 42 group[i].outerHeight(height); 43 } 44 45 height = 0; 46 full = 1; 47 group = []; 48 } 49 } 50 }); 51 52 if (!full) { 53 54 for (var i = group.length - 1; i >= 0; i--) { 55 group[i].outerHeight(height); 56 } 57 } 58 59 if (!settings.columns) { 60 object.outerHeight(height); 61 } 62 } 63 } 64 } 65 } 66 67 setHeight(argumentsPassed); 68 69 $(window).load(function() { 70 setHeight(argumentsPassed); 71 }); 72 73 var changeScreenWidth; 74 75 $(window).resize(function() { 76 77 clearTimeout(changeScreenWidth); 78 79 if ($('html').width() > 0 && $('html').width() < 9999) { 80 81 changeScreenWidth = setTimeout(function(){ 82 setHeight(argumentsPassed); 83 }, 200); 84 } 85 }); 86 87 return this; 88 }; 89 90}( jQuery ));
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.