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

  • Home
  • SEARCH
  • 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 8161307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:28:16+00:00 2026-06-06T18:28:16+00:00

jQuery-newbie here. I want to do a simple horizontal scroll function with two buttons.

  • 0

jQuery-newbie here.

I want to do a simple horizontal scroll function with two buttons. I want to do it with animate. But when I click on one of the buttons, nothing happens…

Heres the jQuery Code:

<script type="text/javascript">
$(document).ready(function() {
    $('#right-button').click(function {
        $('#box').animate({
        left: +="200px"
        }, "fast");
    });

    $('#left-button').click(function {
        $('#box').animate({
        left: -="200px"
        }, "fast");
    });
});
</script>

This is the HTML code:

<section id="main">
    <span class="scrollbutton left" id="left-button">(</span>
    <span class="scrollbutton right" id="right-button">)</span>
    <div id="box">
        <div class="column"></div>
        ...
    </div>
</section>

(I’ve also tried it with an a-Tag)

Aaaaand here’s the css:

#main {
    border: solid 1px #fff;
    max-height: 480px;
    width: auto;
    display: block;
    overflow: hidden;
    background: #ddd;
}

#main #box {
    width: 2250px;
    display: inline;
    float: left;
    position: relative;
}

#main .column {
    float: left;
    display: inline;
    padding: 10px;
    width: 429px;
    border-left: solid 1px #333;
    height: 460px;
}

.scrollbutton {
    font-family: "WebSymbolsRegular";
    font-size: 30px;
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.left {
    float: left;
}

.right {
    float: right;
}

It’s probably a very naive error, but I just have no idea what it is… I hope you can help me 🙂

PS: You can find it here: http://patrickmanser.ch/pixelsword/

  • 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-06T18:28:18+00:00Added an answer on June 6, 2026 at 6:28 pm
    $('#right-button').click(function() {
            $('#box').animate({
            left: "+=200px"
            }, "fast");
        });
    
        $('#left-button').click(function() {
            $('#box').animate({
            left: "-=200px"
            }, "fast");
        });
    

    function() 😉

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

Sidebar

Related Questions

I'm a newbie to jquery, but have managed to make a show-function and hover
So, I am a TOTAL jQuery / jQuery Tools newbie, but I'm learning... Here's
I'm a complete jquery newbie, but I'm following this tutorial here to get me
I'm a jquery newbie... still learning the framework.... and here goes my query... The
Newbie jquery: does the .css() function alter css properties of an element if the
I am newbie to jQuery, can someone explain what this code does: $(#currency form).submit(function(e)
Jquery newbie here. In a wrapped element set, is there a way to check
Jquery newbie here =) so I've got a code that slides the menu divs
I'm a newbie in Jquery Ajax. I need your help. I want to display
I'm a jQuery newbie. I have a simple form with n lines (although I'm

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.