pass index on slide events in ui object