1/** 2 * Flatten height same as the highest element for each row. 3 * 4 * Copyright (c) 2011 Hayato Takenaka 5 * Dual licensed under the MIT and GPL licenses: 6 * http://www.opensource.org/licenses/mit-license.php 7 * http://www.gnu.org/licenses/gpl.html 8 * @author: Hayato Takenaka (https://github.com/urin/jquery.tile.js) 9 * @version: 1.1.1 10 **/ 11(function($) { 12 $.fn.tile = function(columns) { 13 var tiles, $tile, max, c, h, remove, s = document.body.style, a = ["height"], 14 last = this.length - 1; 15 if(!columns) columns = this.length; 16 remove = s.removeProperty ? s.removeProperty : s.removeAttribute; 17 return this.each(function() { 18 remove.apply(this.style, a); 19 }).each(function(i) { 20 c = i % columns; 21 if(c == 0) tiles = []; 22 $tile = tiles[c] = $(this); 23 h = ($tile.css("box-sizing") == "border-box") ? $tile.outerHeight() : $tile.innerHeight(); 24 if(c == 0 || h > max) max = h; 25 if(i == last || c == columns - 1) { 26 $.each(tiles, function() { this.css("height", max); }); 27 } 28 }); 29 }; 30})(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.