onSortEnd


List item 0
List item 1
List item 2
List item 3
List item 4
List item 5
List item 6
List item 7
List item 8
List item 9


HTML:
<div id='outerCont'>
    <div id='listCont'>
        <div class='listItem'>
            List item 1
        </div>
        <div class='listItem'>
            List item 2
        </div>
        ...
    </div>
</div>

CSS:
#outerCont {
	height: 300px;
	overflow: auto;
	border: 1px solid #777777;
}

#listCont {
	position: relative;
}

.listItem {
	padding: 1.4em;
	background-color: #FFFFFF;
	border-bottom: 1px solid #DDDDDD;
}

JS:
lithiumlist.attachToList(
    '123456789',
    document.getElementById('outerCont'),
    document.getElementById('listCont'),
    'listItem',
    {
    	leftEnabled: false,
    	rightEnabled: false,
    	onSortEnd: function(instance, oldIndex, newIndex) {
	        if (oldIndex != newIndex) {
	            var items = instance.listCont.getElementsByClassName(instance.listItemClass);
	            var oldItem = items[oldIndex];
	            var newItem = items[newIndex];

	            instance.listCont.removeChild(oldItem);    
	            if (newIndex > oldIndex) {
	                instance.listCont.insertBefore(oldItem, newItem.nextSibling);
	            } else {
	                instance.listCont.insertBefore(oldItem, newItem);
	            }
	        }
    	}
    }
);