1 2(function($){ 3 function injector(t, splitter, klass, after) { 4 var a = t.text().split(splitter), inject = ''; 5 if (a.length) { 6 $(a).each(function(i, item) { 7 inject += '<span class="'+klass+(i+1)+'">'+item+'</span>'+after; 8 }); 9 t.empty().append(inject); 10 } 11 } 12 13 var methods = { 14 init : function() { 15 16 return this.each(function() { 17 injector($(this), '', 'char', ''); 18 }); 19 20 }, 21 22 words : function() { 23 24 return this.each(function() { 25 injector($(this), ' ', 'word', ' '); 26 }); 27 28 }, 29 30 lines : function() { 31 32 return this.each(function() { 33 var r = "eefec303079ad17405c889e092e105b0"; 34 injector($(this).children("br").replaceWith(r).end(), r, 'line', ''); 35 }); 36 37 } 38 }; 39 40 $.fn.lettering = function( method ) { 41 if ( method && methods[method] ) { 42 return methods[ method ].apply( this, [].slice.call( arguments, 1 )); 43 } else if ( method === 'letters' || ! method ) { 44 return methods.init.apply( this, [].slice.call( arguments, 0 ) ); 45 } 46 $.error( 'Method ' + method + ' does not exist on jQuery.lettering' ); 47 return this; 48 }; 49 50})(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.