[jQuery] Calling function through an event

[jQuery] Calling function through an event


I am using a slider and want to add labels to the slide/start event.
How can I call function from these events?
Something like this:
    $(function() {
        $("#slider").slider({
            value:0,
            min: 0,
            max: 11,
            step: 1,
            slide: myFunction(ui.value);
        });
    });
function myFunction(val){
//
}