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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:54:59+00:00 2026-05-20T15:54:59+00:00

I have an image scroller that I am trying to implement. The image scrolling

  • 0

I have an image scroller that I am trying to implement. The image scrolling works, but it is moving vertically instead of horizontally. Here is what I got so far:

<a href = "#" id = "btnNext">Next Image</a>

$('#btnNext').click(function () {
    //Calls new image with value true, meaning next image
    newImage(true);
    return false;
});

function newImage(direction) {
  //Get the current selected item (with selected class), if none was found, get the first item
  current_image = $('#imageGallery li.selected').length ? $('#imageGallery li.selected') : $('#imageGallery li:first');

  //If determines slideshow direction
  if (direction) {    //Next image
      //Get next sibling
      next_image = (current_image.next().length) ? current_image.next() :  $('#imageGallery li:first');
  } else {    //Previous image
      //Get previous sibling
      next_image = (current_image.prev().length) ? current_image.prev() :  $('#imageGallery li:last');
  }

  //Clear selected class
  $('#imageGallery li').removeClass('selected');

  //Reassign selected class to current image
  next_image.addClass('selected');

  //Scroll images
  $('#images').scrollTo(next_image, 800);
}

Update: Here are my quesions:
1) How do I edit this to make it move horizontally?
2) Is there a way to make an image scroller like this without using .scrollTo()?

  • 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-20T15:55:00+00:00Added an answer on May 20, 2026 at 3:55 pm

    I assume you want to make the gallery move horizontally, not vertically. (You say both in the question.) This is just a CSS issue: change the list to show horizontally (display: inline-block or float: left for instance) and the scrollTo plugin should do that for you.

    It is possible to do this without the scrollTo plugin. The plugin uses the jQuery animate function to move around the page and, well, you can do the same if you want. 🙂 Here’s a quick jsFiddle that uses animate to move pictures in a gallery. Obviously it needs quite a bit of work (doesn’t go back to the beginning at the last pic, only goes 1 way, doesn’t calculate picture width, etc.), but it should hopefully give you an idea of how it can be done.

    http://jsfiddle.net/meloncholy/KzBzT/

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

Sidebar

Related Questions

I want to build an image scroller that works like google map. When the
I have image data and i want to get a sub image of that
I have: image 1:Many imageToTag Many:1 tag I want to issue a query that
i have an image that contains a series of images, e.g.: In the olden
I have a really weird situation. The idea is there is a scroller that
Sorry that I don't have an example. However I'm creating a scrolling box (scrolls
I am trying to implement a filmstrip-like UIScrollView that will be populated with thumbnails
I am trying to achieve a scrolling effect using jQuery. I have a background
I have an image and on it are logos (it's a map), I want
I have an image of a basic game map. Think of it as just

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.