Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:04:28+00:00 2026-06-13T05:04:28+00:00

Can anyone help with adding navigation arrows to the code snippet found here Slide

  • 0

Can anyone help with adding navigation arrows to the code snippet found here

Slide a div offscreen using jQuery
and the first answer given …. http://jsfiddle.net/jtbowden/ykbgT/2/

I want to be able to add direction arrows or prev/next links

Code below

html:

<div id="container">

    <div id="box1" class="box">Div #1</div>
    <div id="box2" class="box">Div #2</div>
    <div id="box3" class="box">Div #3</div>
    <div id="box4" class="box">Div #4</div>
    <div id="box5" class="box">Div #5</div>

</div>

css:

body {
    padding: 0px;    
}

#container {
    position: absolute;
    margin: 0px;
    padding: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;  
}

.box {
    position: absolute;
    width: 50%;
    height: 300px;
    line-height: 300px;
    font-size: 50px;
    text-align: center;
    border: 2px solid black;
    left: 150%;
    top: 100px;
    margin-left: -25%;
}

#box1 {
    background-color: green;
    left: 50%;
}

#box2 {
    background-color: yellow;
}

#box3 {
    background-color: red;
}

#box4 {
    background-color: orange;
}

#box5 {
    background-color: blue;
}

javascript:

$('.box').click(function() {

    $(this).animate({
        left: '-50%'
    }, 500, function() {
        $(this).css('left', '150%');
        $(this).appendTo('#container');
    });

    $(this).next().animate({
        left: '50%'
    }, 500);
});

It works brilliantly but navigation is one direction and activated by clicking the boxes

thanks in advance

aor

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:04:29+00:00Added an answer on June 13, 2026 at 5:04 am

    Should be easy to do 🙂

    make a “navigation control” wrapper element:

    var $controller = $('<div class="control-wrapper" />);
    

    add 2 main elements to act as left and right movement buttons:

    var $left = $('<span class="move left" />').appendTo($controller),
        $right = = $('<span class="move right"/>').appendTo($controller);
    

    add an event handler to each movement element for each animation:

    $left.click(function(event) {
     ////MOVE THE NAV LEFT
    };
    
    $right.click(function(event) {
     ////MOVE THE NAV RIGHT
    };
    

    replace the comments with function calls to move the nav (you already have the logic to move it left 😉 )

    NOTE: Make sure you add “cursor: pointer” to the button element CSS classes so that they appear to be clickable to the user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello can anyone help? I am using this full page slider.. http://www.musca.se/full-window-width-jquery-tools-content-slider-demo/ However i
Can anyone help, I am using the following for adding a bookmark to IE
Can anyone help me understand what is going on here? Jenkins has been working
Can anyone please help me on adding new contacts in address book and apply
Can anyone help me with this strange error I'm getting when adding a new
Can anyone help me in integrating Adwhirl in View Controller instead of adding it
Can anyone help, i have been using log4net with success i basically had a
Can anyone help me here, the following works fine on my xp but not
Can anyone help me adding row adding behavior to webdatagrid programmatically: Dim RowAdditions As
Can anyone help - this is driving me mad. I am calling a mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.