Events
onLeftEnd

Triggered at the completion of a left slide.

onLeftEnd(instance, index, didSlideOut)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
didSlideOut
Type: Boolean
True if the slide finished with the clone sliding out of the list. False if the clone slid back to its starting position.
EXAMPLE JS
var props = {
    onLeftEnd: function(instance, index, didSlideOut) {
        if (didSlideOut) {
            console.log('List item ' + index + ' slid out of the list');
        } else {
            console.log('List item ' + index + ' slid back to its starting position');
        }
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onLeftSlideBackStart

Triggered when a list item starts sliding back to its starting position after being swiped to the left.

onLeftSlideBackStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onLeftSlideBackStart: function(instance, index) {
        console.log('List item ' + index + ' is starting to slide back to its starting position');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onLeftSlideOutStart

Triggered when a list item starts sliding out of the list after being swiped to the left.

onLeftSlideOutStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onLeftSlideOutStart: function(instance, index) {
        console.log('List item ' + index + ' is starting to slide out of the list');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onLeftStart

Triggered at the start of a left slide.

onLeftStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onLeftStart: function(instance, index) {
        console.log('List item ' + index + ' is starting to slide left');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onRightEnd

Triggered at the completion of a right slide.

onRightEnd(instance, index, didSlideOut)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
didSlideOut
Type: Boolean
True if the slide finished with the clone sliding out of the list. False if the clone slid back to its starting position.
EXAMPLE JS
var props = {
    onRightEnd: function(instance, index, didSlideOut) {
        if (didSlideOut) {
            console.log('List item ' + index + ' slid out of the list');
        } else {
            console.log('List item ' + index + ' slid back to its starting position');
        }
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onRightSlideBackStart

Triggered when a list item starts sliding back to its starting position after being swiped to the right.

onRightSlideBackStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onRightSlideBackStart: function(instance, index) {
        console.log('List item ' + index + ' is starting to slide back to its starting position');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onRightSlideOutStart

Triggered when a list item starts sliding out of the list after being swiped to the right.

onRightSlideOutStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onRightSlideOutStart: function(instance, index) {
        console.log('List item ' + index + ' is starting to slide out of the list');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onRightStart

Triggered at the start of a right slide.

onRightStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onRightStart: function(instance, index) {
        console.log('List item ' + index + ' is starting to slide right');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onSortAutoScrollEnd

Triggered when automatic scrolling stops.

onSortAutoScrollEnd(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onSortAutoScrollEnd: function(instance, index) {
        console.log('Automatic scrolling stopped and list item ' + index + ' was sorted');
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onSortAutoScrollStart

Triggered when automatic scrolling starts.

onSortAutoScrollStart(instance, index, scrollingUp)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
scrollingUp
Type: Boolean
True if the list is scrolling up and false if it is scrolling down.
EXAMPLE JS
var props = {
    onSortAutoScrollStart: function(instance, index, scrollingUp) {
        if (scrollingUp) {
            console.log('Automatic up-scrolling started and list item ' + index + ' is being sorted');
        } else {
            console.log('Automatic down-scrolling started and list item ' + index + ' is being sorted');
        }
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onSortEnd

Triggered when sorting stops.

onSortEnd(instance, oldIndex, newIndex)
instance
Type: Object
The Lithium List instance object.
oldIndex
Type: Integer
The old index of the active list item.
newIndex
Type: Integer
The new index of the active list item.
EXAMPLE JS
var props = {
    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);
            }       
        }
    }
};
lithiumlist.attachToList(
    ...,
    props
);
onSortStart

Triggered when sorting starts.

onSortStart(instance, index)
instance
Type: Object
The Lithium List instance object.
index
Type: Integer
The index of the active list item.
EXAMPLE JS
var props = {
    onSortStart: function(instance, index) {
        console.log('Sorting of list item ' + index + ' started');
    }
};
lithiumlist.attachToList(
    ...,
    props
);