add input events for slider