Skip to content Skip to sidebar Skip to footer

Get Page To Slide Right Or Left Depending On Where The User Clicked

The title of the question may not be the most descriptive, but basically what I'm trying to do is get a page to slide right if the user clicks a link that is to the right of their

Solution 1:

Like this?

$(document).ready(function(){
    $("a").click(function(){
        if($(this).offset().left>$(".yourehere").offset().left){
            alert("SLide right");
        }else{
            alert("SLide left");
        }

    });
});

Post a Comment for "Get Page To Slide Right Or Left Depending On Where The User Clicked"