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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:51:03+00:00 2026-05-25T05:51:03+00:00

There is a row which can accommodate only three images at once but i

  • 0

There is a row which can accommodate only three images at once but i have several images in server and all i want to fetch. so in that case i need image slider.

Let say there are 10 images e.g. img_1,img_2,img_3,........img_10 and a row & it contains only three images img_1, img_2, img_3 alongwith Left_slider_button & Right_slider_button. What i want? When click on slider_button the images should forward in button direction one by one.
Suppose if i click on left_slider_button then img_2, img_3, img_4 should be in row instead of img_1, img_2, img_3. So There is one image forwarded to left direction and one new image fetched as img_4.

please give me some tips. I guess AJAX would be more useful to fetch the images from server, Right?.

  • 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-25T05:51:03+00:00Added an answer on May 25, 2026 at 5:51 am

    You can put your image names in an array and then loop through them. I used three div’s to hold the images but you could use anything.

    $(function () {
        var images = ["img_1", "img_2", "img_3", "img_4", "img_5", "img_6", "img_7", "img_8", "img_9", "img_10"],
            curIndex = 0,
            gotoImage = function (index) {
                $('#images div').each(function (i) {
                   var image = curIndex + i;
                    if (image >= images.length) {
                        image = image - images.length;
                    }
                   $(this).html(images[image]);
                   // Use something like this to show images instead of text
                   // $(this).html('<img src="' + images[image] + '.jpg" />');
                });            
            };
    
        $('.prev').click(function (e) {
            curIndex--;
            if (curIndex === -1) {
                curIndex = images.length - 1;
            }
            gotoImage(curIndex);
        });
    
        $('.next').click(function (e) {
            curIndex++;
            if (curIndex === images.length) {
                curIndex = 0;
            }
            gotoImage(curIndex);
        });
    });
    

    Here is an example: http://jsfiddle.net/rustyjeans/c3sJW/

    There’s no need to use ajax to load the images, unless you don’t know what the list of images is going to be. If you’re pulling the list of image names from a databse you could use ajax to get that data out and put it in an array, then you could assign that to the array images.

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

Sidebar

Related Questions

I have a mysql table, each row of which can have an arbitrary number
Is there a way to only print or output 10 elements per row inside
Friends, I have written the following JavaScript to ascertain which row of an tabular
I have a header row which has this structure: <th... <a... <span... {text} If
is there any way by which I can change an id type to NSString
In javascript, how can we detect which row of the table is clicked? At
i have created a tableview in which we can add and delete rows. On
Given is a row of at most 30 stones which can either be black
Has anyone managed to make dialogs which can handle all of the following requirements:
I have a listview which loads its data from sqlite database. Each row in

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.