PageSourceSearch

https://www.haikanbuhin.com/js/jquery.tile.js

js haikanbuhin.com collected 2026-10-04 02:25:55 UTC 989 bytes, 33 lines download raw bytes

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: 0.0.3
10**/
11;(function($) {
12	$.fn.tile = function(columns) {
13		var tiles, max, c, h, last = this.length - 1, s;
14		if(!columns) columns = this.length;
15		this.each(function() {
16			s = this.style;
17			if(s.removeProperty) s.removeProperty("height");
18			else if(s.removeAttribute) s.removeAttribute("height");
19		});
20		return this.each(function(i) {
21try{console.time("tile")}catch(e){}
22			c = i % columns;
23			if(c == 0) tiles = [];
24			tiles[c] = $(this);
25			h = tiles[c].height();
26			if(c == 0 || h > max) max = h;
27			if(i == last || c == columns - 1)
28				$.each(tiles, function() { this.height(max); });
29try{console.timeEnd("tile")}catch(e){}
30		});
31	};
32})(jQuery);
33

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.