1jQuery(function($) { 2 $('.text-overflow').each(function() { 3 var $target = $(this); 4 5 // ãªãªã¸ãã«ã®æç« ãåå¾ãã 6 var html = $target.html(); 7 8 // 対象ã®è¦ç´ ããé«ãã«autoãæå®ãé表示ã§è¤è£½ãã 9 var $clone = $target.clone(); 10 $clone 11 .css({ 12 display: 'none', 13 position : 'absolute', 14 overflow : 'visible' 15 }) 16 .width($target.width()) 17 .height('auto'); 18 19 // DOMã䏿¦è¿½å 20 $target.after($clone); 21 22 // æå®ããé«ãã«ãªãã¾ã§ã1æåãã¤æ¶å»ãã¦ãã 23 while((html.length > 0) && ($clone.height() > $target.height())) { 24 html = html.substr(0, html.length - 1); 25 $clone.html(html + '...'); 26 } 27 28 // æç« ãå ¥ãæ¿ãã¦ãè¤è£½ããè¦ç´ ãåé¤ãã 29 $target.html($clone.html()); 30 $clone.remove(); 31 }); 32});
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.