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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:06:20+00:00 2026-05-28T00:06:20+00:00

I want to create a list of thumbnails with a button previous and another

  • 0

I want to create a list of thumbnails with a button previous and another next, showing 10 thumbnails at a time and hiding the rest, and when you reach the 10th tumbnail and click the next button, the 1st disappear and appear the 11th.

I’ve tried with:
Javascript

jQuery(document).ready(function() {
    var count = 0;
    var images = 11;
    var page = 1;
    var current = 1;

    jQuery('.ice-navigator li').each(function(index) {
        count++;

        jQuery(this).attr('id', 'menu-item-' + count);
        jQuery(this).attr('class', 'menu-page-' + page);

        if(count >= (page * images)) {
            page++;
        }

        jQuery(this).hide();
    })

    jQuery('.ice-navigator li.menu-page-1').show();
    jQuery('.ice-next').click(function() {
        if(current >= count) {
            current = 1;
        } else {
            current++;
        }

        item = jQuery('.ice-navigator li#menu-item-' + current);
        if(jQuery(item).hasClass('active')) {
            jQuery(item).removeClass('active');
            page = jQuery('.ice-navigator li#menu-item-' + current).attr('class');
            jQuery(item).addClass('active');
        } else {
            page = jQuery('.ice-navigator li#menu-item-' + current).attr('class');
        }

        jQuery('.ice-navigator li').hide();
        jQuery('.ice-navigator li.' + page).show();
    })

    jQuery('.ice-previous').click(function() {
        current--;
        if(current <= 0) {
            current = count;        
        }

        item = jQuery('.ice-navigator li#menu-item-' + current);
        if(jQuery(item).hasClass('active')) {
            jQuery(item).removeClass('active');
            page = jQuery('.ice-navigator li#menu-item-' + current).attr('class');
            jQuery(item).addClass('active');
        } else {
            page = jQuery('.ice-navigator li#menu-item-' + current).attr('class');
        }
    })

    jQuery('.ice-navigator li').click(function() {
        current = jQuery(this).attr('id').replace('menu-item-', '');
    })
})

HTML

<div class="ice-previous">Previous</div>
<div class="ice-navigator-wrapper clearfix">
    <div class="ice-navigator-outer">
        <ul class="ice-navigator">
            <li>THUMBNAIL 1</li>
            <li>THUMBNAIL 2</li>
            [...]
            <li>THUMBNAIL 11</li>
            <li>THUMBNAIL 12</li>
        </ul>
    </div>
</div>
<div class="ice-next">Next</div>

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-28T00:06:20+00:00Added an answer on May 28, 2026 at 12:06 am

    Edit: I now understand it is like a circular ref. I have made some changes accordingly.

    See my updated DEMO here

    Below is for regular nav which stops when you reach the end.

    Check my old DEMO here.

    I used 2 pointers to manage the start and end position. Implemented adjustNav function to show/hide div based on start and end position.

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

Sidebar

Related Questions

I want to create a list with thumbnails, a text description and a number
I want to create a list from one to ten. Each time it loops
I want to create a list of category terms (contained within a block), with
I want to create a list of GridBagPanel.Constraints . I read it in the
I`v come across a need where I want to create multiple list items from
Sorry for the Newb-ness. I want to create a list of view elements in
I want create module which update list of usb devices automatically (not only mass
I want to create a dropdown list with a list of spoken languages (English,
I want to create a custom list in Flex for an interface prototype. The
My Goal: i want to create an horizontal list of images. when mouse is

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.