1/* Thanks to CSS Tricks for pointing out this bit of jQuery 2http://css-tricks.com/equal-height-blocks-in-rows/ 3It's been modified into a function called at page load and then each time the page is resized. One large modification was to remove the set height before each new calculation. 4http://codepen.io/micahgodbolt/pen/FgqLc */ 5 6equalheight = function(container) { 7 8 var currentTallest = 0, 9 currentRowStart = 0, 10 rowDivs = new Array(), 11 $el, 12 topPosition = 0; 13 14 $(container).each(function() { 15 16 $el = $(this); 17 $($el).height('auto') 18 topPostion = $el.offset().top; 19 20 if (currentRowStart != topPostion) { 21 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 22 rowDivs[currentDiv].height(currentTallest); 23 } 24 rowDivs.length = 0; // empty the array 25 currentRowStart = topPostion; 26 currentTallest = $el.height(); 27 rowDivs.push($el); 28 } else { 29 rowDivs.push($el); 30 currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); 31 } 32 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 33 rowDivs[currentDiv].height(currentTallest); 34 } 35 }); 36} 37 38//$(window).load(function() { 39// equalheight('.equal-heights .state-chart'); 40//}); 41 42//$(window).resize(function() { 43// equalheight('.equal-heights .state-chart'); 44//}); 45 46 47$(window).load(function() { 48 $('.equal-heights').each(function(){ 49 equalheight('.state-chart'); 50 }) 51}); 52 53$(window).resize(function() { 54 $('.equal-heights').each(function(){ 55 equalheight('.state-chart'); 56 }) 57});
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.