Slider javascript to slide

I am using the slider and I want to animate the slider when a user clicks a button. Is there any javascript hooks to do this? Or has anyone done this?