Delete item


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'>
        	<div class='innerCont'>
	            <i class='icon-trash oln'></i>
	            List item 0
        	</div>
            <div class='innerMask'>
            </div>
        </div>
        <div class='listItem'>
        	<div class='innerCont'>
	            <i class='icon-trash oln'></i>
	            List item 1
        	</div>
            <div class='innerMask'>
            </div>
        </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;
	position: relative;
	max-height: 4em;
}

.innerCont {
	position: relative;
}

i {
	position: absolute;
	bottom: 0;
}

i:hover, i:active {
	cursor: pointer;
	font-weight: bold;
}

i.icon-trash {
	right: 0;
}

.innerMask {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	box-shadow: inset 0 0 4px rgba(0,0,0,0.8);
	background-color: red;
}

.listItem.left-item-active .innerMask, .listItem.deleting .innerMask {
	display: block;
}

.listItem.deleting {
	transition: max-height 200ms ease;
	max-height: 0;
}

JS:
lithiumlist.attachToList(
    '123456789',
    document.getElementById('outerCont'),
    document.getElementById('listCont'),
    'listItem',
    {
    	sortEnabled: false,
    	rightEnabled: false,
    	leftButtonClass: 'icon-trash',
	    leftMasks: [],
    	onLeftEnd: function(instance, index, didSlideOut) {
    		if (didSlideOut) {
	    		var items = instance.listCont.getElementsByClassName(instance.listItemClass);
	    		items[index].className = items[index].className + ' deleting';
	    		setTimeout(function() {
	    			instance.listCont.removeChild(items[index]);
	    		}, 200);
    		}
    	}
    }
);