Added callback for slider.