Change slider handle programmatically

Change slider handle programmatically


can I move the handles programmatically in a button click:
function SetSliders(){
$("#slider").slider('max', 'value', 37);
}
I cant get this to work...