MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / injector

Function injector

scripts/libs/lettering.js:14–22  ·  view source on GitHub ↗
(t, splitter, klass, after)

Source from the content-addressed store, hash-verified

12*/
13(function($){
14 function injector(t, splitter, klass, after) {
15 var a = t.text().split(splitter), inject = '';
16 if (a.length) {
17 $(a).each(function(i, item) {
18 inject += '<span class="'+klass+(i+1)+'">'+item+'</span>'+after;
19 });
20 t.empty().append(inject);
21 }
22 }
23
24 var methods = {
25 init : function() {

Callers 1

lettering.jsFile · 0.85

Calls 1

$Function · 0.70

Tested by

no test coverage detected