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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:32:04+00:00 2026-06-11T21:32:04+00:00

I got this idea, in a NO CMS site… i have about 50 images,,

  • 0

I got this idea, in a NO CMS site… i have about 50 images,, that cannot be display all at once. SO the idea, is to display the first 15, then click on next, hide those and display the next 15 etc etc

Hot to do that with ajax or wit php and css ?

count, add class hidden, and show ?


or another way to do that… in php or jQuery, how to get the first 15 element of a div with class”image” and add class : showimage, then on click NEXT button : remove all the class showimage, and show the image 16 to 30


code look like that :

<div id="gallery2"> <!-- Gallery de photos --> 

<a href="ia/new_01.jpg" class="highslide" onclick="return hs.expand(this)">
<img src="timthumb.php?src=ia/new_01.jpg&amp;h=<?php echo $size ?>" title="Cliquer pour agrandir" 
alt="Pont Neuf - Ile de la Cité - Paris - France - Aquarelle <br> Conception personnelle"/></a>

<a href="ia/new_02.jpg" class="highslide" onclick="return hs.expand(this)">
<img src="timthumb.php?src=ia/new_02.jpg&amp;h=<?php echo $size ?>" title="Cliquer pour agrandir" 
alt="Studebaker Hawk - Concept rétro <br> Conception personnelle"/></a>

<a href="ia/new_03.jpg" class="highslide" onclick="return hs.expand(this)">
<img src="timthumb.php?src=ia/new_03.jpg&amp;h=<?php echo $size ?>" title="Cliquer pour agrandir" 
alt="Corvette - Concept rétro <br> Conception personnelle"/></a>

<a href="ia/new_04.jpg" class="highslide" onclick="return hs.expand(this)">
<img src="timthumb.php?src=ia/new_04.jpg&amp;h=<?php echo $size ?>" title="Cliquer pour agrandir" 
alt="Thunderbird - Concept rétro <br> Conception personnelle"/></a>

<a href="ia/new_05.jpg" class="highslide" onclick="return hs.expand(this)">
<img src="timthumb.php?src=ia/new_05.jpg&amp;h=<?php echo $size ?>" title="Cliquer pour agrandir" 
alt="Les autos de mon père <br> Conception personnelle"/></a>

and on and on and on…. for 50 images

  • 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-06-11T21:32:05+00:00Added an answer on June 11, 2026 at 9:32 pm

    You dont neex ajax for this. You can put all the image urls in an JS array and when a then next button is clicked you just hide the current 15 images and add new 15 images from the array. You render them on the fly. So images will be rendered by browser on the fly.

    var images=[]; // it'll contain images.
    var ptr=0;
    var length = 15;
    function show(offset, count){
        for(var i=offset;i<offset+count;i++){
            // add image images[i] in the image container.
        }
    }
    function next(){
        // empty the image container
        ptr+=length
        show(ptr, length);
    }
    
    show(0, length); // initial call to display first chunk of images
    

    Now for the next button you just add next function as click handler.

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

Sidebar

Related Questions

I got this idea of expanding my trace() messages. Why trace() is all over
We got pitched this idea yesterday. A user visits our site and are marked.
I just got this question on an interview and had no idea how to
this is the weirdest error I've ever got on Rails. Any idea what this
Got this site with UN/PW set via the Createuserwizard control. Client considers PW too
Got this code for a viewscroller from the apple developers site. @synthesize scrollView1, scrollView2;
I am working on a website in a CMS site. I have provided a
I'm currently playing around with a CMS idea I've got. It's based on a
I'm working on a simple custom cms - this is for a school that
I've got this problem. I launched an ASP.NET website with the Umbraco CMS on

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.