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 two days on this so far and combed through every source at
I've spent two days on this and I still can't find the cause of
I have spent too much time on this problem and am beginning to think
Ok so I've spent a couple hours trying to resolve this issue and have
I have spent lot of time doing research on VIM. I am Windows guy
I have spent several hours trying to find a means of writing a cross
A colleague and I have spent a few years developing a really cool Matlab
using the Code Snippet for sending email in VB.Net I have successfully sent an
Last week I wrote a few lines of code in C# to fire up
I have found this example on StackOverflow: var people = new List<Person> { new

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.