[jQuery] passing next & prev through function

[jQuery] passing next & prev through function


hello,
i'm building a portfolio page and i'm trying to pass next or prev
through this function to pass the direction.
does anyone know how to do this?
I already tried passing next and prev and filling them in the right
position in the function.
this is what i have already:
function PortVolgende(){
    if ($("#portfolio-items a.actief").next().length > 0 ) {
        $("#content").animate({ scrollLeft: $("#content").scrollLeft()+$
("#content").width() }, 2000);
        $("#portfolio-items a.actief").next().addClass("actief").prev
().removeClass("actief");
    }
}
thanks a lot.