cjc/littering — Issue #1: Pass not just the current item but the list of all items
Author: gka
Created: 2012-02-22 15:01:05+00:00
State: open

It would be nice if the customize function would pass not just the current item but the list of all items. You're example would look like this:

```javascript
$("#demo7 h1").littering('chars',function(items,i){
var str = items[i].charCodeAt(0) > 64 && items[i].charCodeAt(0) < 91 ? " upper" : "" ;
return ''+items[i]+'';
});
```

The hard-core use case for this is to implement a simple kerning table. Say you have a font where you need less spacing between every pair of "AT". This would add the class *kern_AT* to every T that follows an A.

```javascript
$('h1').littering('chars', function(items, i) {
var str = i > 0 && items[i-1] == "A" && items[i] == "T" ? " kern_AT" : "";
return ''+items[i]+'';
});
```