[jQuery] Transition for previous, and next

[jQuery] Transition for previous, and next


Hi,
I've searched this forum, but I couldn't find a solution for this yet:
Is it possible to show a certain transition for a previous button and
for a next button? I would like to create a transition left when
people click 'previous' and a transition right when people click
'next'. That makes sense I think :).
I've already tried the following code (but that didn't work):
the variable left can set via the buttons on true or either false;
$('#photo').cycle({
    before: function (currSlide, nextSlide, opts) {
        if(left) {
            opts.fx = 'scrollLeft';
        } else {
            opts.fx = 'scrollRight';
        }
    },
    next: '#next',
    prev: '#prev'
});
Has anyone a solution for this?
Many thanks in advance.