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 6210301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:08:09+00:00 2026-05-24T06:08:09+00:00

I have spent the last two days looking for a simple javascript or jquery

  • 0

I have spent the last two days looking for a simple javascript or jquery code for this. I want to incorporate a horizontal scrolling div using javascript or jquery to display images and descriptive text for the work page of my web portfolio.

It would function very similar to the glide-onclick scrolling shown here: http://www.dyn-web.com/code/scroll/demos.php#horiz Unfortunately that code license is $40, and I am a broke student.

On loading of the page, three portfolio images will be shown. Extras are hidden in the overflow to the right. Onclick of a left arrow (I can create), a new image slide comes into view from the right. A right arrow click sends it back into overflow. I don’t want scrollbars, just arrows controlling the slides.

Any help is much appreciated. Thanks.

  • 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-05-24T06:08:10+00:00Added an answer on May 24, 2026 at 6:08 am

    You can just use code like this:

    function FixMargin(left) {
        $(this).css("left", left);
    }
    
    $(document).ready(function () {
    
    $('#rightbutton').click(function () {
        var left = parseInt($("#bitToSlide").css('left'), 10);
        $("#bitToSlide").animate({ left: left - pageWidth }, 400, FixMargin(left - pageWidth));
    });
    
    $('#leftbutton').click(function () {
        var left = parseInt($("#bitToSlide").css('left'), 10);
        $("#bitToSlide").animate({ left: left + pageWidth }, 400, FixMargin(left + pageWidth));
    });
    
    }
    

    where your html looks like this:

    <div id="slideleft" class="slide">
        <div class="inner" id="bitToSlide" style="width:1842px">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr valign="top">
                    <td id="page1" style="width: 614px">
                    </td>
    
                    <td id="page2" style="width: 614px">
                    </td>
                </tr>
            </table>
        </div>
    </div>
    

    and your css looks like this:

    .slide
    {
    position:relative;
    overflow:hidden;
    height:365px;
    width:597px;
    margin:1em 0;
    background-color:#E9ECEF;
    border:0px
    }
    
    .slide .inner
    {
    position:absolute;
    left:0;
    bottom:0;
    height:365px;
    padding:0px;
    background-color:#E9ECEF;
    color:#333
    }
    

    I wrote the above a really long time ago – so you probably want to update it a bit (replace the table’s with div’s for example) but it works.

    You obviously need the two buttons on there as well

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

Sidebar

Related Questions

I've spent the last 2 days trying to figure this out, basically I have
I've spent two days on this and I still can't find the cause of
The last two days I spent with hunting down memory leaks. I´ve read the
I've spent two days on this so far and combed through every source at
I've spent the last day or so looking in CAS and have managed to
I've spent the last couple days reading my various books and looking through MSDN's
I have two tables, that is joined in some way. I've spent the last
I have spent the last several years fighting tooth and nail to avoid working
I have spent too much time on this problem and am beginning to think
I have spent all Friday and Saturday on this and I am running out

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.